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/low-to-tree-fn.sml
ViewVC logotype

Diff of /branches/lamont/src/compiler/tree-il/low-to-tree-fn.sml

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

revision 2245, Sun Mar 3 12:51:51 2013 UTC revision 2246, Sun Mar 3 14:51:31 2013 UTC
# Line 646  Line 646 
646    
647      fun translate prog = let      fun translate prog = let
648          (* first we do a variable analysis pass on the Low IL *)          (* first we do a variable analysis pass on the Low IL *)
649            val prog as IL.Program{props, globalInit, globalBlock, initially, strands} = VA.optimize prog            val prog as IL.Program{props, globalInit, globalBlock, globalReduce, initially, strands} = VA.optimize prog
650  (* FIXME: here we should do a contraction pass to eliminate unused variables that VA may have created *)  (* FIXME: here we should do a contraction pass to eliminate unused variables that VA may have created *)
651            val _ = (* DEBUG *)            val _ = (* DEBUG *)
652                  LowPP.output (Log.logFile(), "LowIL after variable analysis", prog)                  LowPP.output (Log.logFile(), "LowIL after variable analysis", prog)
653            val env = newEnv()            val env = newEnv()
654        val globals = (IL.CFG.liveAtExit globalBlock)        val globals = (IL.CFG.liveAtExit globalReduce)
655            val globals = List.map            val globals = List.map
656                  (fn x => let val x' = newGlobal x in global(env, x, x'); x' end)                  (fn x => let val x' = newGlobal x in global(env, x, x'); x' end)
657                    (globals)                    (globals)
# Line 664  Line 664 
664                  inputInit = trCFG (env, [], fn _ => [], inputInit),                  inputInit = trCFG (env, [], fn _ => [], inputInit),
665                  globalInit = trCFG (env, [], fn _ => [], globalInit),                  globalInit = trCFG (env, [], fn _ => [], globalInit),
666          globalBlock =trCFG (env, [], fn _ => [], globalBlock),          globalBlock =trCFG (env, [], fn _ => [], globalBlock),
667            globalReduce =trCFG (env, [], fn _ => [], globalReduce),
668                  strands = strands,                  strands = strands,
669                  initially = trInitially (env, initially)                  initially = trInitially (env, initially)
670                }                }

Legend:
Removed from v.2245  
changed lines
  Added in v.2246

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