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

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/compiler/high-il/high-opt.sml
ViewVC logotype

Diff of /branches/pure-cfg/src/compiler/high-il/high-opt.sml

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

revision 491, Wed Jan 26 15:31:09 2011 UTC revision 499, Tue Feb 1 17:37:51 2011 UTC
# Line 132  Line 132 
132              loop (Stats.sum{from=firstCounter, to=lastCounter}, prog)              loop (Stats.sum{from=firstCounter, to=lastCounter}, prog)
133            end            end
134    
135      fun optimize (prog as IL.Program{globals, globalInit, actors}) = let      fun optimize (prog as IL.Program{globals, globalInit, strands}) = let
136            val _ = Census.init prog            val _ = Census.init prog
137            fun doCFG cfg = let            fun doCFG cfg = let
138                  val nodes = IL.CFG.sort cfg                  val nodes = IL.CFG.sort cfg
# Line 148  Line 148 
148                    loopToFixPt simplify nodes;                    loopToFixPt simplify nodes;
149                    loopToFixPt reduce nodes                    loopToFixPt reduce nodes
150                  end                  end
151            fun doActor (IL.Actor{stateInit, methods, ...}) = let            fun doStrand (IL.Strand{stateInit, methods, ...}) = let
152                  val nodes = IL.CFG.sort stateInit                  val nodes = IL.CFG.sort stateInit
153                  in                  in
154                    loopToFixPt simplify nodes;                    loopToFixPt simplify nodes;
155                    loopToFixPt reduce nodes;                    loopToFixPt reduce nodes;
156                    List.app doMethod methods                    List.app doMethod methods
157                  end                  end
158            val _ = List.app doActor actors            val _ = List.app doStrand strands
159            in            in
160              IL.Program{              IL.Program{
161                  globals = globals,                  globals = globals,
162                  globalInit = globalInit,                  globalInit = globalInit,
163                  actors = actors                  strands = strands
164                }                }
165            end            end
166    

Legend:
Removed from v.491  
changed lines
  Added in v.499

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