# HG changeset patch # User Lukas Stadler # Date 1345469209 -7200 # Node ID 2fb937396924ee53923775bdefcfcf670f459906 # Parent fd8832ae511d58a1af893954e076e11821e0377b canonicalize after escape analysis diff -r fd8832ae511d -r 2fb937396924 graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/EscapeAnalysisPhase.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/EscapeAnalysisPhase.java Mon Aug 20 15:21:31 2012 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/EscapeAnalysisPhase.java Mon Aug 20 15:26:49 2012 +0200 @@ -350,7 +350,7 @@ Debug.dump(graph, "Before escape %s", node); Debug.log("!!!!!!!! non-escaping object: %s (%s)", node, node.stamp()); - removeAllocation(node, op); + removeAllocation(graph, node, op); Debug.dump(graph, "After escape", graph); break; } @@ -379,8 +379,8 @@ } while (iterations++ < 3); } - protected void removeAllocation(FixedWithNextNode node, EscapeOp op) { - new EscapementFixup(op, (StructuredGraph) node.graph(), node).apply(); + protected void removeAllocation(StructuredGraph graph, FixedWithNextNode node, EscapeOp op) { + new EscapementFixup(op, graph, node).apply(); for (PhiNode phi : node.graph().getNodes(PhiNode.class)) { ValueNode simpleValue = phi; @@ -395,9 +395,10 @@ } } if (!required) { - ((StructuredGraph) node.graph()).replaceFloating(phi, simpleValue); + graph.replaceFloating(phi, simpleValue); } } + new CanonicalizerPhase(target, runtime, assumptions).apply(graph); } protected boolean shouldAnalyze(@SuppressWarnings("unused") FixedWithNextNode node) {