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 4203, Thu Jul 14 00:30:42 2016 UTC revision 4204, Thu Jul 14 00:53:31 2016 UTC
# Line 667  Line 667 
667  raise ex)  raise ex)
668        (* replace the edge oldSrc-->dst by the edge src-->dst *)        (* replace the edge oldSrc-->dst by the edge src-->dst *)
669          fun replaceInEdge {oldSrc, src, dst} = (          fun replaceInEdge {oldSrc, src, dst} = (
670              (* first set the successor of src *)              (* first set the successor of src; check to see if we are replacing a conditional
671                case kind oldSrc               * node with a conditional node.
672                 of COND{trueBranch, falseBranch, ...} =>               *)
673                  case (kind oldSrc, kind src)
674                   of (COND{trueBranch, falseBranch, ...}, COND _) =>
675                      if same(!trueBranch, dst)                      if same(!trueBranch, dst)
676                        then setTrueBranch (src, dst)                        then setTrueBranch (src, dst)
677                        else setFalseBranch (src, dst)                        else setFalseBranch (src, dst)
678                  | FOREACH{bodyEntry, succ, ...} =>                  | (FOREACH{bodyEntry, succ, ...}, FOREACH _) =>
679                      if same(!bodyEntry, dst)                      if same(!bodyEntry, dst)
680                        then setBodyEntry (src, dst)                        then setBodyEntry (src, dst)
681                        else setSucc (src, dst)                        else setSucc (src, dst)

Legend:
Removed from v.4203  
changed lines
  Added in v.4204

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