Mercurial > hg > truffle
changeset 5423:b26a95cf8e3d
Keep UsagesDroppedNodes in canonicalizer
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 22 May 2012 13:30:30 +0200 |
parents | 4e9723f38034 |
children | 3f6496caa1a4 441cf24df453 86478955e54c |
files | graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/CanonicalizerPhase.java |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 {