Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/instructions/basicAnnotations.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/instructions/basicAnnotations.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 410, Fri Sep 3 00:25:03 1999 UTC revision 429, Wed Sep 8 09:47:00 1999 UTC
# Line 20  Line 20 
20     exception CTRL_DEF of int     exception CTRL_DEF of int
21     exception CTRL_USE of int     exception CTRL_USE of int
22    
23        (*
24         * These annotations specifies definitions and uses                              * for a pseudo instruction.
25         *)
26       exception DEFUSER  of int list * int list
27       exception DEFUSEF  of int list * int list
28       exception DEFUSECC of int list * int list
29    
30       exception REGINFO of int -> string
31    
32       exception NO_OPTIMIZATION
33       exception CALLGC
34    
35     fun toString(BRANCH_PROB b)    = "branch("^Int.toString b^"%)"     fun toString(BRANCH_PROB b)    = "branch("^Int.toString b^"%)"
36       | toString(EXECUTION_FREQ r) = "freq("^Real.toString r^")"       | toString(EXECUTION_FREQ r) = "freq("^Real.toString r^")"
37       | toString(COMMENT s)        = s       | toString(COMMENT s)        = s
38       | toString(CTRL_DEF x)       = "ctrl-def "^Int.toString x       | toString(CTRL_DEF x)       = "ctrl-def "^Int.toString x
39       | toString(CTRL_USE x)       = "ctrl-use "^Int.toString x       | toString(CTRL_USE x)       = "ctrl-use "^Int.toString x
40         | toString(DEFUSER x)        = "reg "^defUse x
41         | toString(DEFUSEF x)        = "freg "^defUse x
42         | toString(DEFUSECC x)       = "ccreg "^defUse x
43       | toString a                 = raise a       | toString a                 = raise a
44    
45       and defUse(d,u) =
46       let fun list l =
47               String.concat(foldr (fn (r,l) => Int.toString r::" "::l) [] l)
48       in  "defs="^list d^" uses="^list u end
49    
50     val _ = Annotations.attachPrettyPrinter toString     val _ = Annotations.attachPrettyPrinter toString
51    
52  end  end

Legend:
Removed from v.410  
changed lines
  Added in v.429

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0