# HG changeset patch # User Gilles Duboscq # Date 1337686230 -7200 # Node ID b26a95cf8e3d68242cd1dacd9a660ae72bd56c18 # Parent 4e9723f38034d3da04c9bb573178f6928230c633 Keep UsagesDroppedNodes in canonicalizer diff -r 4e9723f38034 -r b26a95cf8e3d graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/CanonicalizerPhase.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/CanonicalizerPhase.java Tue May 22 12:10:58 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/CanonicalizerPhase.java Tue May 22 13:30:30 2012 +0200 @@ -94,6 +94,14 @@ } tool = new Tool(workList, runtime, target, assumptions, immutabilityPredicate); processWorkSet(graph); + + while (graph.getUsagesDroppedNodesCount() > 0) { + for (Node n : graph.getAndCleanUsagesDroppedNodes()) { + if (!n.isDeleted() && n.usages().size() == 0 && GraphUtil.isFloatingNode().apply(n)) { + n.safeDelete(); + } + } + } } public interface IsImmutablePredicate {