Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/lamont/src/compiler/tree-il/var-analysis.sml
ViewVC logotype

Diff of /branches/lamont/src/compiler/tree-il/var-analysis.sml

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

revision 2083, Thu Nov 8 18:42:05 2012 UTC revision 2101, Thu Dec 6 06:37:07 2012 UTC
# Line 65  Line 65 
65      fun assignDepths (IL.Program{      fun assignDepths (IL.Program{
66            props,            props,
67            globalInit,            globalInit,
68          globalReduce,
69            initially = IL.Initially{rangeInit, iters, create, ...},            initially = IL.Initially{rangeInit, iters, create, ...},
70            strands            strands
71          }) = let          }) = let
# Line 128  Line 129 
129                  List.app (assignDepthsForMethod state) methods)                  List.app (assignDepthsForMethod state) methods)
130            in            in
131              IL.CFG.apply doGlobalInitNode globalInit;              IL.CFG.apply doGlobalInitNode globalInit;
132            IL.CFG.apply doGlobalInitNode globalReduce;
133            (* do initially code *)            (* do initially code *)
134              doCFG (initiallyScope, rangeInit);              doCFG (initiallyScope, rangeInit);
135              List.app              List.app
# Line 304  Line 306 
306            end            end
307    
308      fun optimize prog = let      fun optimize prog = let
309            val IL.Program{props, globalInit, initially, strands} = prog            val IL.Program{props, globalInit, globalReduce, initially, strands} = prog
310          (* first we compute binding and use depths *)          (* first we compute binding and use depths *)
311            val _ = assignDepths prog            val _ = assignDepths prog
312          (* then rewrite the code *)          (* then rewrite the code *)
313            val globalInit = assignScopeForGlobalInit globalInit            val globalInit = assignScopeForGlobalInit globalInit
314          val globalReduce = assignScopeForGlobalInit globalReduce
315            val strands = List.map assignScopeForStrand strands            val strands = List.map assignScopeForStrand strands
316            in            in
317              IL.Program{props=props, globalInit=globalInit, initially=initially, strands=strands}              IL.Program{props=props, globalInit=globalInit, globalReduce = globalReduce, initially=initially, strands=strands}
318            end            end
319    
320    end    end

Legend:
Removed from v.2083  
changed lines
  Added in v.2101

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