# HG changeset patch # User Doug Simon # Date 1376404067 -7200 # Node ID 16dedd5911eacfbcd3d3aff61bff15d5c87a0fb0 # Parent dc4cedf73358c346e7f0a42c51ace2dea408b834 removed overly conservative re-anchoring in ConditionalEliminationPhase diff -r dc4cedf73358 -r 16dedd5911ea graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/ConditionalEliminationPhase.java --- 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()) {