Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Tracker SCM

SCM Repository

[smlnj] Diff of /sml/branches/idlbasis-devel/src/MLRISC/IR/mlrisc-cfg-gen.sml
ViewVC logotype

Diff of /sml/branches/idlbasis-devel/src/MLRISC/IR/mlrisc-cfg-gen.sml

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

revision 858, Wed Jun 27 21:20:27 2001 UTC revision 859, Wed Jun 27 21:43:12 2001 UTC
# Line 139  Line 139 
139         fun emit i =         fun emit i =
140         let val CFG.BLOCK{insns,...} = getBlock()         let val CFG.BLOCK{insns,...} = getBlock()
141         in  insns := i :: !insns;         in  insns := i :: !insns;
142             if InsnProps.instrKind i = InsnProps.IK_JUMP then             case InsnProps.instrKind i of
143                 (InsnProps.IK_JUMP | InsnProps.IK_CALL_WITH_CUTS) =>
144                currentBlock := NOBLOCK                currentBlock := NOBLOCK
145             else ()             | _ => ()
146         end         end
147    
148         (* End current cluster *)         (* End current cluster *)
# Line 169  Line 170 
170                 (case !insns of                 (case !insns of
171                    [] => fallsThru(id,blocks)                    [] => fallsThru(id,blocks)
172                  | instr::_ =>                  | instr::_ =>
173                     if InsnProps.instrKind instr = InsnProps.IK_JUMP then                     (case InsnProps.instrKind instr of
174                          (InsnProps.IK_JUMP | InsnProps.IK_CALL_WITH_CUTS) =>
175                        jump(id,InsnProps.branchTargets instr,blocks)                        jump(id,InsnProps.branchTargets instr,blocks)
176                     else                     | _ => fallsThru(id,blocks)
177                       fallsThru(id,blocks);                     );
178                  addEdges blocks                  addEdges blocks
179                 )                 )
180             and fallsThru(i,CFG.BLOCK{id=j,data,...}::_) =             and fallsThru(i,CFG.BLOCK{id=j,data,...}::_) =
# Line 218  Line 220 
220         (* Start a new cluster *)         (* Start a new cluster *)
221         fun beginCluster _ = init()         fun beginCluster _ = init()
222    
223           fun getAnnotations() = CFG.annotations(!CFG)
224    
225      in  {stream=S.STREAM      in  {stream=S.STREAM
226             {  beginCluster= beginCluster,             {  beginCluster= beginCluster,
227                endCluster  = endCluster,                endCluster  = endCluster,
# Line 227  Line 231 
231                emit        = emit,                emit        = emit,
232                exitBlock   = exitBlock,                exitBlock   = exitBlock,
233                comment     = comment,                comment     = comment,
234                annotation  = annotation                annotation    = annotation,
235                  getAnnotations= getAnnotations
236             },             },
237           next = next           next = next
238          }          }

Legend:
Removed from v.858  
changed lines
  Added in v.859

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