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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/cfg-ir/unused-elim-fn.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/cfg-ir/unused-elim-fn.sml

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

revision 3936, Mon Jun 6 10:34:23 2016 UTC revision 3937, Mon Jun 6 13:16:10 2016 UTC
# Line 50  Line 50 
50                      | IR.STATE _ => (Stats.tick cntUnused; IR.CFG.deleteNode nd)                      | IR.STATE _ => (Stats.tick cntUnused; IR.CFG.deleteNode nd)
51                      | IR.VAR x => (Stats.tick cntUnused; decUse x; IR.CFG.deleteNode nd)                      | IR.VAR x => (Stats.tick cntUnused; decUse x; IR.CFG.deleteNode nd)
52                      | IR.LIT _ => (Stats.tick cntUnused; IR.CFG.deleteNode nd)                      | IR.LIT _ => (Stats.tick cntUnused; IR.CFG.deleteNode nd)
 (* FIXME: we should distinguish between mutation effects and allocation effects! *)  
53                      | IR.OP(rator, xs) => if IR.Op.isPure rator                      | IR.OP(rator, xs) => if IR.Op.isPure rator
54                          then (Stats.tick cntUnused; List.app decUse xs; IR.CFG.deleteNode nd)                          then (Stats.tick cntUnused; List.app decUse xs; IR.CFG.deleteNode nd)
55                          else ()                          else ()
# Line 64  Line 63 
63                  else ()                  else ()
64              | IR.MASSIGN{stm=([], _, _), ...} => ()  (* executed for side effects *)              | IR.MASSIGN{stm=([], _, _), ...} => ()  (* executed for side effects *)
65              | IR.MASSIGN{stm=(ys, rator, xs), ...} =>              | IR.MASSIGN{stm=(ys, rator, xs), ...} =>
 (* FIXME: we should distinguish between mutation effects and allocation effects! *)  
66                  if IR.Op.isPure rator andalso List.all (fn y => (useCount y = 0)) ys                  if IR.Op.isPure rator andalso List.all (fn y => (useCount y = 0)) ys
67                    then (                    then (
68                      Stats.tick cntUnused;                      Stats.tick cntUnused;

Legend:
Removed from v.3936  
changed lines
  Added in v.3937

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