# HG changeset patch # User Lukas Stadler # Date 1365698246 -7200 # Node ID 8e093f170343366253604ac814f65029b524f502 # Parent 4f3f35f5d811a50394ab6b4bf01e2a57e0ed57bb fix errorneous handling of ValueAnchorNodes in TailDuplicationPhase diff -r 4f3f35f5d811 -r 8e093f170343 graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java Thu Apr 11 16:54:49 2013 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java Thu Apr 11 18:37:26 2013 +0200 @@ -251,7 +251,6 @@ final HashSet duplicatedNodes = buildDuplicatedNodeSet(fixedNodes, stateAfter); mergeAfter.clearEnds(); expandDuplicated(duplicatedNodes, mergeAfter); - retargetDependencies(duplicatedNodes, anchor); List endSnapshot = merge.forwardEnds().snapshot(); List phiSnapshot = merge.phis().snapshot(); @@ -526,29 +525,6 @@ } /** - * Moves all depdendencies that point outside the duplicated area to the supplied value - * anchor node. - * - * @param duplicatedNodes The set of duplicated nodes. - * @param anchor The node that will be the new target for all dependencies that point - * outside the duplicated set of nodes. - */ - private static void retargetDependencies(HashSet duplicatedNodes, ValueAnchorNode anchor) { - for (Node node : duplicatedNodes) { - if (node instanceof ValueNode) { - NodeInputList dependencies = ((ValueNode) node).dependencies(); - for (int i = 0; i < dependencies.size(); i++) { - Node dependency = dependencies.get(i); - if (dependency != null && !duplicatedNodes.contains(dependency)) { - Debug.log("retargeting dependency %s to %s on %s", dependency, anchor, node); - dependencies.set(i, anchor); - } - } - } - } - } - - /** * Checks if the given node has usages that are not within the given set of nodes. * * @param node The node whose usages are checked.