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

SCM Repository

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

Diff of /trunk/src/compiler/low-il/low-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 25  Line 25 
25              ("low-check", checkFlag, "enable consistency checking for LowIL [debug]")              ("low-check", checkFlag, "enable consistency checking for LowIL [debug]")
26            ]            ]
27    
28        val timeCheck = PhaseTimer.withTimer Timers.timeLowCheck (fn arg => CheckLowIL.check arg)
29    
30      fun checkIL (phase, prog) =      fun checkIL (phase, prog) =
31            if !checkFlag andalso CheckLowIL.check ("after " ^ phase, prog)            if !checkFlag andalso timeCheck ("after " ^ phase, prog)
32              then (              then (
33                TextIO.output(TextIO.stdErr, concat[                TextIO.output(TextIO.stdErr, concat[
34                    "***** Internal error after ", phase,                    "***** Internal error after ", phase,
# Line 40  Line 42 
42                prog)                prog)
43              else prog              else prog
44    
45      fun transform (ctl, phase, transform, prog) =      fun transform (ctl, timer, phase, transform, prog) =
46            if !ctl            if !ctl
47              then checkIL (phase, transform prog)              then checkIL(phase, PhaseTimer.withTimer timer transform prog)
48              else prog              else prog
49    
50      fun optimize prog = let      fun optimize prog = let
51            val prog = transform (vnFlag, "value numbering", VN.transform, prog)            val prog = transform (vnFlag, Timers.timeLowVN, "value numbering", VN.transform, prog)
52            in            in
53              prog              prog
54            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