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/buildFlowgraph.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/flowgraph/buildFlowgraph.sml

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

revision 1016, Tue Jan 15 23:10:06 2002 UTC revision 1017, Wed Jan 16 14:48:16 2002 UTC
# Line 170  Line 170 
170            in List.foldl switch 0 targets; ()            in List.foldl switch 0 targets; ()
171            end            end
172    
173        and fallsThru(id, blks) = let        and fallsThru(id, blks) =
         fun fallThruEdge(to) = addEdge (id, to, CFG.FALLSTHRU)  
       in  
174          case blks          case blks
175           of [] => fallThruEdge(EXIT)           of [] => addEdge(id, EXIT, CFG.FALLSTHRU)
176            | CFG.BLOCK{id=next, insns=ref(_::_), (*data=ref[], JHR *) ...}::_ => fallThruEdge(next)            | CFG.BLOCK{id=next, ...}::_ => addEdge(id, next, CFG.FALLSTHRU)
177            | CFG.BLOCK{id=next, ...} ::_ => error          (*esac*)
              (* if pseudo ops are alignment directives, this may not be an error *)  
              (Fmt.format "Block %d falls through to pseudoOps in %d\n"  
                 [Fmt.INT id, Fmt.INT next])  
       end  
178    
179        and addEdges [] = ()        and addEdges [] = ()
180          | addEdges(CFG.BLOCK{id, insns=ref[], ...}::blocks) = fallsThru(id, blocks)          | addEdges(CFG.BLOCK{id, insns=ref[], ...}::blocks) = fallsThru(id, blocks)

Legend:
Removed from v.1016  
changed lines
  Added in v.1017

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