Mercurial > hg > truffle
changeset 9031:8e093f170343
fix errorneous handling of ValueAnchorNodes in TailDuplicationPhase
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Thu, 11 Apr 2013 18:37:26 +0200 |
parents | 4f3f35f5d811 |
children | 0279403fc3c9 |
files | graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/TailDuplicationPhase.java |
diffstat | 1 files changed, 0 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- 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<Node> duplicatedNodes = buildDuplicatedNodeSet(fixedNodes, stateAfter); mergeAfter.clearEnds(); expandDuplicated(duplicatedNodes, mergeAfter); - retargetDependencies(duplicatedNodes, anchor); List<EndNode> endSnapshot = merge.forwardEnds().snapshot(); List<PhiNode> 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<Node> duplicatedNodes, ValueAnchorNode anchor) { - for (Node node : duplicatedNodes) { - if (node instanceof ValueNode) { - NodeInputList<ValueNode> 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.