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/ssa-fn.sml
ViewVC logotype

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

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

revision 3842, Tue May 10 14:25:30 2016 UTC revision 3843, Tue May 10 15:10:58 2016 UTC
# Line 209  Line 209 
209    
210      structure GlobalVar =      structure GlobalVar =
211        struct        struct
212          fun new (kind, isUpdated, name, ty) = GV{          fun new (kind, isVarying, name, ty) = GV{
213                  id = Stamp.new(),                  id = Stamp.new(),
214                  name = name,                  name = name,
215                  ty = ty,                  ty = ty,
216                  kind = kind,                  kind = kind,
217                  updated = isUpdated,                  updated = isVarying,
218                  binding = ref NONE,                  binding = ref NONE,
219                  useCnt = ref 0,                  useCnt = ref 0,
220                  props = PropList.newHolder()                  props = PropList.newHolder()
# Line 222  Line 222 
222          fun name (GV{name, ...}) = name          fun name (GV{name, ...}) = name
223          fun uniqueName (GV{id, name, ...}) = name ^ Stamp.toString id          fun uniqueName (GV{id, name, ...}) = name ^ Stamp.toString id
224          fun kind (GV{kind, ...}) = kind          fun kind (GV{kind, ...}) = kind
225          fun isUpdated (GV{updated, ...}) = updated          fun isVarying (GV{updated, ...}) = updated
226          fun bindingOf (GV{binding, ...}) = !binding          fun bindingOf (GV{binding, ...}) = !binding
227          fun setBinding (GV{binding, ...}, x) = (binding := SOME x)          fun setBinding (GV{binding, ...}, x) = (binding := SOME x)
228          fun ty (GV{ty, ...}) = ty          fun ty (GV{ty, ...}) = ty
# Line 452  Line 452 
452                  new (MASSIGN{pred = ref dummy, stm = (lhs, rator, args), succ = ref dummy})                  new (MASSIGN{pred = ref dummy, stm = (lhs, rator, args), succ = ref dummy})
453                end                end
454          fun mkGASSIGN (lhs, rhs) = (          fun mkGASSIGN (lhs, rhs) = (
455                if not(GlobalVar.isUpdated lhs) then GlobalVar.setBinding(lhs, rhs) else ();                if not(GlobalVar.isVarying lhs) then GlobalVar.setBinding(lhs, rhs) else ();
456                new (GASSIGN{pred = ref dummy, lhs = lhs, rhs = rhs, succ = ref dummy}))                new (GASSIGN{pred = ref dummy, lhs = lhs, rhs = rhs, succ = ref dummy}))
457          fun mkNEW {strand, args} = new (NEW{          fun mkNEW {strand, args} = new (NEW{
458                  pred = ref dummy, strand = strand, args = args, succ = ref dummy                  pred = ref dummy, strand = strand, args = args, succ = ref dummy

Legend:
Removed from v.3842  
changed lines
  Added in v.3843

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