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

SCM Repository

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

Diff of /trunk/src/compiler/high-il/high-opt.sml

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

revision 2355, Sun Apr 7 11:35:08 2013 UTC revision 2356, Sun Apr 7 14:45:25 2013 UTC
# Line 22  Line 22 
22      val debugFlag = ref true            (* controls printing *)      val debugFlag = ref true            (* controls printing *)
23      val checkFlag = ref true            (* controls IL checking *)      val checkFlag = ref true            (* controls IL checking *)
24    
25        val timeCheck = PhaseTimer.withTimer Timers.timeHighCheck (fn arg => CheckHighIL.check arg)
26    
27      val controls = [      val controls = [
28              ("high-vn", vnFlag, "enable value-numbering for HighIL"),              ("high-vn", vnFlag, "enable value-numbering for HighIL"),
29              ("high-debug", debugFlag, "enable printing HighIL to log file [debug]"),              ("high-debug", debugFlag, "enable printing HighIL to log file [debug]"),
# Line 44  Line 46 
46                OS.Process.exit OS.Process.failure)                OS.Process.exit OS.Process.failure)
47              else prog)              else prog)
48    
49      fun transform (ctl, phase, transform, prog) =      fun transform (ctl, timer, phase, transform, prog) =
50            if !ctl            if !ctl
51              then checkIL (phase, transform prog)              then checkIL(phase, PhaseTimer.withTimer timer transform prog)
52              else prog              else prog
53    
54      fun optimize prog = let      fun optimize prog = let
55            val prog = checkIL ("translation to HighIL", prog)            val prog = checkIL ("translation to HighIL", prog)
56            val prog = transform (vnFlag, "value numbering", VN.transform, prog)            val prog = transform (vnFlag, Timers.timeHighVN, "value numbering", VN.transform, prog)
57            val prog = checkIL ("normalization", Normalize.transform prog)            val prog = checkIL ("normalization", PhaseTimer.withTimer Timers.timeHighNorm Normalize.transform prog)
58            in            in
59              prog              prog
60            end            end

Legend:
Removed from v.2355  
changed lines
  Added in v.2356

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