Mercurial > hg > graal-compiler
changeset 5892:2fb937396924
canonicalize after escape analysis
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Mon, 20 Aug 2012 15:26:49 +0200 |
parents | fd8832ae511d |
children | 95489123901a 67a357e3e42a |
files | graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/EscapeAnalysisPhase.java |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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) {