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/branches/SMLNJ/src/MLRISC/ir-moved/dominator.sml
ViewVC logotype

Diff of /sml/branches/SMLNJ/src/MLRISC/ir-moved/dominator.sml

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

revision 410, Fri Sep 3 00:25:03 1999 UTC revision 411, Fri Sep 3 00:25:03 1999 UTC
# Line 11  Line 11 
11   * uses the DJgraph.  In order not to bother with constructing and   * uses the DJgraph.  In order not to bother with constructing and
12   * maintaining the DJgraph, we'll just use a combination of the dominator tree   * maintaining the DJgraph, we'll just use a combination of the dominator tree
13   * and the original cfg.   * and the original cfg.
14     *
15     * -- Allen
16   *)   *)
17    
18  functor DominatorTreeFn (GraphImpl : GRAPH_IMPLEMENTATION  functor DominatorTreeFn (GraphImpl : GRAPH_IMPLEMENTATION
# Line 407  Line 409 
409        (Dom, PDom)        (Dom, PDom)
410     end     end
411    
412       fun levels(G.GRAPH dom) =
413       let val levels = A.array(#capacity dom (),~1)
414       in  #forall_nodes dom (fn (i,DOM{level,...}) => A.update(levels,i,level));
415           levels
416       end
417    
418       fun idoms(G.GRAPH dom) =
419       let val idoms = A.array(#capacity dom (),~1)
420       in  #forall_edges dom (fn (i,j,_) => A.update(idoms,j,i));
421           idoms
422       end
423    
424  end  end
425    
 (*  
  * $Log$  
  *)  

Legend:
Removed from v.410  
changed lines
  Added in v.411

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