changeset 11298:16dedd5911ea

removed overly conservative re-anchoring in ConditionalEliminationPhase
author Doug Simon <doug.simon@oracle.com>
date Tue, 13 Aug 2013 16:27:47 +0200
parents dc4cedf73358
children 1bdb4a3ffdc6
files graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java
diffstat 1 files changed, 1 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java	Tue Aug 13 14:25:02 2013 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java	Tue Aug 13 16:27:47 2013 +0200
@@ -534,16 +534,9 @@
                         // for any nodes currently anchored to the surviving branch
                     } else {
                         if (!anchored.isEmpty()) {
-                            // Ideally we'd simply want to re-anchor to replacementAnchor. However,
-                            // this can cause guards currently anchored to the surviving branch
-                            // to float too high in the graph. So, we insert a new anchor between
-                            // the guards and replacementAnchor.
-                            ValueAnchorNode valueAnchor = graph.add(new ValueAnchorNode());
                             for (Node a : anchored.snapshot()) {
-                                a.replaceFirstInput(survivingSuccessor, valueAnchor);
+                                a.replaceFirstInput(survivingSuccessor, replacementAnchor);
                             }
-                            valueAnchor.addAnchoredNode(replacementAnchor);
-                            graph.addBeforeFixed(ifNode, valueAnchor);
                         }
                         ifNode.setCondition(replacement);
                         if (compare.usages().isEmpty()) {