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 /MLRISC/trunk/IR/mlrisc-cfg2cluster.sml
ViewVC logotype

Diff of /MLRISC/trunk/IR/mlrisc-cfg2cluster.sml

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

revision 429, Wed Sep 8 09:47:00 1999 UTC revision 469, Wed Nov 10 22:42:52 1999 UTC
# Line 10  Line 10 
10     structure F   : FLOWGRAPH     structure F   : FLOWGRAPH
11        sharing CFG.I = F.I        sharing CFG.I = F.I
12        sharing CFG.P = F.P        sharing CFG.P = F.P
       sharing CFG.B = F.B  
13    
14     (*     (*
15      * If relayout is true, then always use the layout algorithm.      * If relayout is true, then always use the layout algorithm.
# Line 27  Line 26 
26      structure F    : FLOWGRAPH      structure F    : FLOWGRAPH
27         sharing CFG.I = F.I         sharing CFG.I = F.I
28         sharing CFG.P = F.P         sharing CFG.P = F.P
        sharing CFG.B = F.B  
29     ) : CFG2CLUSTER =     ) : CFG2CLUSTER =
30  struct  struct
31    
# Line 48  Line 46 
46    
47          (* create a new BBLOCK with id i *)          (* create a new BBLOCK with id i *)
48      fun bblock M (i,b as      fun bblock M (i,b as
49                   CFG.BLOCK{kind,freq,name,annotations,insns,labels,data,...}) =                   CFG.BLOCK{kind,freq,annotations,insns,labels,data,...}) =
50      let val labels = map F.LABEL (!labels)      let val labels = map F.LABEL (!labels)
51      in  case kind of      in  case kind of
52             CFG.STOP => map pseudo_op (!data)             CFG.STOP => map pseudo_op (!data)
53          |  _ =>          |  _ =>
54          let fun filter(CFG.LIVEOUT _::an,an') = filter(an,an')          let val block = F.BBLOCK{blknum      = i,
               | filter(a::an,an') = filter(an,a::an')  
               | filter([],an') = an'  
             val block = F.BBLOCK{blknum      = i,  
55                                   freq        = freq,                                   freq        = freq,
56                                   annotations = ref(filter(!annotations,[])),                                   annotations = ref(#rmv CFG.LIVEOUT
57                                   name        = name,                                                      (!annotations)),
58                                   insns       = insns,                                   insns       = insns,
59                                   liveIn      = ref F.C.empty,                                   liveIn      = ref F.C.empty,
60                                   liveOut     = ref (CFG.liveOut b),                                   liveOut     = ref (CFG.liveOut b),

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

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