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/IR/mlrisc-cfg-util.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/IR/mlrisc-cfg-util.sml

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

revision 468, Wed Nov 10 22:42:52 1999 UTC revision 469, Wed Nov 10 22:42:52 1999 UTC
# Line 112  Line 112 
112                       else ()                       else ()
113                 |  _ => raise Can'tMerge                 |  _ => raise Can'tMerge
114         val _ = if mustPreceed CFG (i,j) then raise Can'tMerge else ()         val _ = if mustPreceed CFG (i,j) then raise Can'tMerge else ()
115         val CFG.BLOCK{data=d2,name=n2,insns=i2,annotations=a2,...} =         val CFG.BLOCK{data=d2,insns=i2,annotations=a2,...} =
116                #node_info cfg j                #node_info cfg j
117         val _  = case !d2 of [] => () | _ => raise Can'tMerge         val _  = case !d2 of [] => () | _ => raise Can'tMerge
118         val CFG.BLOCK{data=d1,name=n1,insns=i1,annotations=a1,...} =         val CFG.BLOCK{data=d1,insns=i1,annotations=a1,...} =
119                #node_info cfg i                #node_info cfg i
120            (* If the two blocks have different names then don't merge them *)            (* If both blocks have annotations then don't merge them *)
121         val _ = if CFG.B.==(n1,n2) then () else raise Can'tMerge         val _ = case (!a1, !a2) of
122                     (_::_, _::_) => raise Can'tMerge
123                   | _ => ()
124         val insns1 = case !i1 of         val insns1 = case !i1 of
125                        [] => []                        [] => []
126                      | insns as jmp::rest =>                      | insns as jmp::rest =>
# Line 192  Line 194 
194                | SOME _ => true)                | SOME _ => true)
195         val insns = ref(if jump then [P.jump(labelOf CFG j)] else [])         val insns = ref(if jump then [P.jump(labelOf CFG j)] else [])
196         val node =         val node =
197             CFG.BLOCK{id=k, kind=kind, name=CFG.B.default,             CFG.BLOCK{id=k, kind=kind,
198                       freq= ref(!w), data=ref [], labels = ref [],                       freq= ref(!w), data=ref [], labels = ref [],
199                       insns=insns, annotations=ref []}                       insns=insns, annotations=ref []}
200         val kind = if jump then CFG.JUMP else CFG.FALLSTHRU         val kind = if jump then CFG.JUMP else CFG.FALLSTHRU

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

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