Mercurial > hg > truffle
comparison graal/com.oracle.max.graal.compiler/src/com/oracle/max/graal/compiler/phases/DeadCodeEliminationPhase.java @ 2953:445233cd91df
added GraalOptions.TestGraphDuplication, fixed graph duplication
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Wed, 15 Jun 2011 11:21:53 +0200 |
parents | 0c0e407faa39 |
children | cbece91420af |
comparison
equal
deleted
inserted
replaced
2952:ec86f14be4cf | 2953:445233cd91df |
---|---|
98 | 98 |
99 private void disconnectCFGNodes() { | 99 private void disconnectCFGNodes() { |
100 for (Node node : graph.getNodes()) { | 100 for (Node node : graph.getNodes()) { |
101 if (node != Node.Null && !flood.isMarked(node) && isCFG(node)) { | 101 if (node != Node.Null && !flood.isMarked(node) && isCFG(node)) { |
102 if (node instanceof LoopEnd) { | 102 if (node instanceof LoopEnd) { |
103 assert ((LoopEnd) node).loopBegin() != null : "node " + node; | |
103 brokenLoops.add(((LoopEnd) node).loopBegin()); | 104 brokenLoops.add(((LoopEnd) node).loopBegin()); |
104 } | 105 } |
105 // iterate backwards so that the predecessor indexes in removePhiPredecessor are correct | 106 // iterate backwards so that the predecessor indexes in removePhiPredecessor are correct |
106 for (int i = node.successors().size() - 1; i >= 0; i--) { | 107 for (int i = node.successors().size() - 1; i >= 0; i--) { |
107 Node successor = node.successors().get(i); | 108 Node successor = node.successors().get(i); |