# HG changeset patch # User Bernhard Urban # Date 1367522893 -7200 # Node ID 2777aafe689ba28854459777f1a72461ebc9557f # Parent afbb1b5a0eaa9787011028ee339c0652f88a96e3 TypeProfileProxy: remove profile proxies after inlining logic before, profiles were lost after the first iteration of IterativeInliningPhase (if enabled) diff -r afbb1b5a0eaa -r 2777aafe689b graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java --- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Thu May 02 20:53:27 2013 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Thu May 02 21:28:13 2013 +0200 @@ -133,9 +133,8 @@ new IterativeConditionalEliminationPhase().apply(graph, highTierContext); } } - } else { - TypeProfileProxyNode.cleanFromGraph(graph); } + TypeProfileProxyNode.cleanFromGraph(graph); plan.runPhases(PhasePosition.HIGH_LEVEL, graph); diff -r afbb1b5a0eaa -r 2777aafe689b graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/TypeProfileProxyNode.java --- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/TypeProfileProxyNode.java Thu May 02 20:53:27 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/TypeProfileProxyNode.java Thu May 02 21:28:13 2013 +0200 @@ -126,7 +126,8 @@ public static void cleanFromGraph(StructuredGraph graph) { for (TypeProfileProxyNode proxy : graph.getNodes(TypeProfileProxyNode.class)) { - proxy.replaceAtUsages(proxy.getObject()); + graph.replaceFloating(proxy, proxy.getObject()); } + assert graph.getNodes(TypeProfileProxyNode.class).count() == 0; } } diff -r afbb1b5a0eaa -r 2777aafe689b graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java --- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java Thu May 02 20:53:27 2013 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java Thu May 02 21:28:13 2013 +0200 @@ -144,9 +144,6 @@ } } } - - // Clean up type profiles. - TypeProfileProxyNode.cleanFromGraph(graph); } @Override