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

SCM Repository

[diderot] Diff of /branches/lamont/src/compiler/IL/census-fn.sml
ViewVC logotype

Diff of /branches/lamont/src/compiler/IL/census-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 22  Line 22 
22      fun inc (IL.V{useCnt, ...}) = (useCnt := !useCnt + 1)      fun inc (IL.V{useCnt, ...}) = (useCnt := !useCnt + 1)
23      fun dec (IL.V{useCnt, ...}) = (useCnt := !useCnt - 1)      fun dec (IL.V{useCnt, ...}) = (useCnt := !useCnt - 1)
24    
25      fun init (IL.Program{globalInit, globalBlock, initially, strands, ...}) = let      fun init (IL.Program{globalInit, globalBlock, globalReduce, initially, strands, ...}) = let
26            fun clearVar (IL.V{name,useCnt, ...}) = (case name            fun clearVar (IL.V{name,useCnt, ...}) = (case name
27                  of "qCellDim" => useCnt := 1  (* HACK: Need to keep grid cell/dimensions around so they can be used  during runtime*)                  of "qCellDim" => useCnt := 1  (* HACK: Need to keep grid cell/dimensions around so they can be used  during runtime*)
28                   | "qGridDim" => useCnt := 1                   | "qGridDim" => useCnt := 1
# Line 101  Line 101 
101            (* first clear the counts of all variables *)            (* first clear the counts of all variables *)
102              IL.CFG.apply clearNode globalInit;              IL.CFG.apply clearNode globalInit;
103          IL.CFG.apply clearNode globalBlock;          IL.CFG.apply clearNode globalBlock;
104            IL.CFG.apply clearNode globalReduce;
105              clearInitially initially;              clearInitially initially;
106              List.app clearStrand strands;              List.app clearStrand strands;
107            (* then count uses *)            (* then count uses *)
108              IL.CFG.apply (incNode (fn _ => ())) globalInit;              IL.CFG.apply (incNode (fn _ => ())) globalInit;
109          IL.CFG.apply (incNode (fn _ => ())) globalBlock;          IL.CFG.apply (incNode (fn _ => ())) globalBlock;
110            IL.CFG.apply (incNode (fn _ => ())) globalReduce;
111              incInitially initially;              incInitially initially;
112              List.app incStrand strands              List.app incStrand strands
113            end            end

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