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/flowgraph/cfg.sig
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/flowgraph/cfg.sig

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

revision 1084, Thu Feb 21 18:52:44 2002 UTC revision 1125, Thu Mar 7 21:04:13 2002 UTC
# Line 14  Line 14 
14     structure P : PSEUDO_OPS     structure P : PSEUDO_OPS
15     structure I : INSTRUCTIONS     structure I : INSTRUCTIONS
16    
17     structure W : FREQ    (* used to represent frequency of execution; we use reals because some
18       * static prediction methods produce such.
19     type weight = W.freq     *)
20       type weight = real
21    
22     datatype block_kind =     datatype block_kind =
23         START          (* entry node *)         START          (* entry node *)
# Line 70  Line 71 
71     *    If the block ends with a call that has been wrapped with a FLOW_TO,     *    If the block ends with a call that has been wrapped with a FLOW_TO,
72     *    then there will be one FALLSTHRU out edges and one or more FLOWSTO     *    then there will be one FALLSTHRU out edges and one or more FLOWSTO
73     *    out edges.     *    out edges.
74       *
75       *    Control-flow to outside the CFG is represented by edges to the unique
76       *    STOP node.  When such edges are to labels that are defined outside
77       *    the CFG, then JUMP, BRANCH, or SWITCH edges are used (as appropriate).
78       *    When such edges are to unkonwn places (e.g., traps, returns, and
79       *    indirect jumps), then an EXIT edge is used.  There should never be
80       *    a FALLSTHRU or ENTRY edge to the STOP node.
81     *)     *)
82      and edge_kind           (* edge kinds *)      and edge_kind           (* edge kinds *)
83        = ENTRY                   (* entry edge *)        = ENTRY                   (* edge from START node *)
84        | EXIT                    (* exit edge *)        | EXIT                    (* unlabeled edge to STOP node *)
85        | JUMP                    (* unconditional jump *)        | JUMP                    (* unconditional jump *)
86        | FALLSTHRU               (* falls through to next block *)        | FALLSTHRU               (* falls through to next block *)
87        | BRANCH of bool          (* branch *)        | BRANCH of bool          (* branch *)
# Line 112  Line 120 
120     *  Methods for manipulating basic blocks     *  Methods for manipulating basic blocks
121     *     *
122     *========================================================================*)     *========================================================================*)
123     val newBlock          : int * W.freq ref -> block (* empty *)     val newBlock          : int * weight ref -> block    (* empty *)
124     val newStart          : int * W.freq ref -> block          (* start node *)     val newStart          : int * weight ref -> block    (* start node *)
125     val newStop           : int * W.freq ref -> block          (* stop node *)     val newStop           : int * weight ref -> block    (* stop node *)
126     val copyBlock         : int * block -> block       (* copy a block *)     val copyBlock         : int * block -> block       (* copy a block *)
127     val defineLabel       : block -> Label.label       (* define a label *)     val defineLabel       : block -> Label.label       (* define a label *)
128     val insns             : block -> I.instruction list ref     val insns             : block -> I.instruction list ref
129     val freq              : block -> W.freq ref     val freq              : block -> weight ref
130     val branchOf          : edge_info -> bool option     val branchOf          : edge_info -> bool option
131    
132                 (* emit assembly *)                 (* emit assembly *)
# Line 170  Line 178 
178     *========================================================================*)     *========================================================================*)
179     val show_block : Annotations.annotations -> block -> string     val show_block : Annotations.annotations -> block -> string
180     val show_edge  : edge_info -> string     val show_edge  : edge_info -> string
181       val dumpBlock : (TextIO.outstream * cfg) -> node -> unit
182       val dump : (TextIO.outstream * string * cfg) -> unit
183    
184  end  end
185    

Legend:
Removed from v.1084  
changed lines
  Added in v.1125

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