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

SCM Repository

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

Diff of /branches/lamont_dev/src/compiler/IL/ssa-fn.sml

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

revision 1864, Mon Apr 30 12:51:00 2012 UTC revision 1868, Fri May 11 03:17:42 2012 UTC
# Line 78  Line 78 
78        | FOREACH of {        | FOREACH of {
79          pred : node ref,          pred : node ref,
80          cond : var,          cond : var,
81            phis: phi list ref,
82          stmBranch: node ref,          stmBranch: node ref,
83            shouldReplace: bool ref,
84          succ : node ref          succ : node ref
85        }        }
86        | NEW of {                        (* create new strand instance *)        | NEW of {                        (* create new strand instance *)
# Line 276  Line 278 
278                        | CONS(_, args) => args                        | CONS(_, args) => args
279                      (* end case *))                      (* end case *))
280                  | MASSIGN{stm=(_, _, args), ...} => args                  | MASSIGN{stm=(_, _, args), ...} => args
281          | FOREACH _ => []          | FOREACH {phis,cond,...} => [cond]@(List.foldr (fn ((_, xs), ys) => xs@ys) [] (!phis))
282                  | NEW{args, ...} => args                  | NEW{args, ...} => args
283                  | SAVE{rhs, ...} => [rhs]                  | SAVE{rhs, ...} => [rhs]
284                  | EXIT{live, ...} => live                  | EXIT{live, ...} => live
# Line 285  Line 287 
287          fun defs (ND{kind, ...}) = (case kind          fun defs (ND{kind, ...}) = (case kind
288                 of JOIN{phis, ...} => List.map #1 (!phis)                 of JOIN{phis, ...} => List.map #1 (!phis)
289                  | ASSIGN{stm=(y, _), ...} => [y]                  | ASSIGN{stm=(y, _), ...} => [y]
290            | FOREACH{phis,...} => List.map #1 (!phis)
291                  | MASSIGN{stm=(ys, _, _), ...} => ys                  | MASSIGN{stm=(ys, _, _), ...} => ys
292                  | _ => []                  | _ => []
293                (* end case *))                (* end case *))
# Line 308  Line 311 
311                  setB (0, lhs);                  setB (0, lhs);
312                  new (MASSIGN{pred = ref dummy, stm = (lhs, rator, args), succ = ref dummy})                  new (MASSIGN{pred = ref dummy, stm = (lhs, rator, args), succ = ref dummy})
313                end                end
314          fun mkFOREACH {cond,stmBranch} = (          fun mkFOREACH {cond,stmBranch,phis} = (
315            new (FOREACH{pred = ref dummy, cond = cond, stmBranch = ref stmBranch, succ = ref dummy}))            new (FOREACH{pred = ref dummy, cond = cond, stmBranch = ref stmBranch, phis = ref phis, shouldReplace = ref false, succ = ref dummy}))
316     fun mkNEW {strand, args} = new (NEW{     fun mkNEW {strand, args} = new (NEW{
317                  pred = ref dummy, strand = strand, args = args, succ = ref dummy                  pred = ref dummy, strand = strand, args = args, succ = ref dummy
318                })                })
# Line 392  Line 395 
395                  | COND{trueBranch, falseBranch, ...} => [!trueBranch, !falseBranch]                  | COND{trueBranch, falseBranch, ...} => [!trueBranch, !falseBranch]
396                  | COM{succ, ...} => [!succ]                  | COM{succ, ...} => [!succ]
397                  | ASSIGN{succ, ...} => [!succ]                  | ASSIGN{succ, ...} => [!succ]
398          | FOREACH{succ, ...} => [!succ]          | FOREACH{succ,stmBranch, ...} => [!stmBranch, !succ]
399                  | MASSIGN{succ, ...} => [!succ]                  | MASSIGN{succ, ...} => [!succ]
400                  | NEW{succ, ...} => [!succ]                  | NEW{succ, ...} => [!succ]
401                  | SAVE{succ, ...} => [!succ]                  | SAVE{succ, ...} => [!succ]

Legend:
Removed from v.1864  
changed lines
  Added in v.1868

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