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 1083, Thu Feb 21 18:52:10 2002 UTC revision 1084, Thu Feb 21 18:52:44 2002 UTC
# Line 22  Line 22 
22         START          (* entry node *)         START          (* entry node *)
23       | STOP           (* exit node *)       | STOP           (* exit node *)
24       | NORMAL         (* normal node *)       | NORMAL         (* normal node *)
      | HYPERBLOCK     (* hyperblock *)  
25    
26     (*     (*
27      * NOTE 1: the instructions are listed in reverse order.      * NOTE 1: the instructions are listed in reverse order.
# Line 53  Line 52 
52        }        }
53    
54    
55     and edge_kind = ENTRY           (* entry edge *)    (* We have the following invariant on blocks and out-edge kinds:
56       *
57       *    If the last instruction of the block is an unconditional jump, then
58       *    there is one out edge labeled with JUMP.
59       *
60       *    If the last instruction of the block is a conditional jump, then
61       *    there are two out edges.  The one corresponding to the jump is
62       *    labeled BRANCH(true) and the other is labeled BRANCH(false).
63       *
64       *    If the last instruction of the block is not a jump, then there is
65       *    one out edge labeled with FALLSTHRU.
66       *
67       *    If the block ends with a switch, then the out edges are labeled with
68       *    SWITCH.
69       *
70       *    If the block ends with a call that has been wrapped with a FLOW_TO,
71       *    then there will be one FALLSTHRU out edges and one or more FLOWSTO
72       *    out edges.
73       *)
74        and edge_kind           (* edge kinds *)
75          = ENTRY                   (* entry edge *)
76                   | EXIT            (* exit edge *)                   | EXIT            (* exit edge *)
77                   | JUMP            (* unconditional jump *)                   | JUMP            (* unconditional jump *)
78                   | FALLSTHRU       (* falls through to next block *)                   | FALLSTHRU       (* falls through to next block *)
79                   | BRANCH of bool  (* branch *)                   | BRANCH of bool  (* branch *)
80                   | SWITCH of int   (* computed goto *)                   | SWITCH of int   (* computed goto *)
81                   | SIDEEXIT of int (* the ith side exit in a hyperblock *)        | FLOWSTO                 (* FLOW_TO edge *)
82    
83     and edge_info = EDGE of { k : edge_kind,                  (* edge kind *)      and edge_info = EDGE of {
84            k : edge_kind,                  (* edge kind *)
85                               w : weight ref,                 (* edge freq *)                               w : weight ref,                 (* edge freq *)
86                               a : Annotations.annotations ref (* annotations *)                               a : Annotations.annotations ref (* annotations *)
87                             }                             }

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

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