Mercurial > hg > graal-compiler
changeset 9553:58a2ff06f4b4
Merge (fixed: 2777aafe689b TypeProfileProxy: remove profile proxies after inlining logic)
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Fri, 03 May 2013 20:27:45 +0200 |
parents | 6fed251e3cee (current diff) 2777aafe689b (diff) |
children | 8ccca4b4f880 |
files | |
diffstat | 4 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Fri May 03 20:26:43 2013 +0200 +++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/GraalCompiler.java Fri May 03 20:27:45 2013 +0200 @@ -133,9 +133,8 @@ new IterativeConditionalEliminationPhase().apply(graph, highTierContext); } } - } else { - TypeProfileProxyNode.cleanFromGraph(graph); } + TypeProfileProxyNode.cleanFromGraph(graph); plan.runPhases(PhasePosition.HIGH_LEVEL, graph);
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/TypeProfileProxyNode.java Fri May 03 20:26:43 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/TypeProfileProxyNode.java Fri May 03 20:27:45 2013 +0200 @@ -108,6 +108,7 @@ } if (type == lastCheckedType) { // We have already incorporate the knowledge about this type => abort. + return this; } lastCheckedType = type; JavaTypeProfile newProfile = this.profile.restrict(type, object.objectStamp().nonNull()); @@ -125,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; } }
--- a/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnboxNode.java Fri May 03 20:26:43 2013 +0200 +++ b/graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/extended/UnboxNode.java Fri May 03 20:27:45 2013 +0200 @@ -79,9 +79,9 @@ case Long: return ConstantNode.forLong((Long) o, graph()); case Float: - return ConstantNode.forFloat((Long) o, graph()); + return ConstantNode.forFloat((Float) o, graph()); case Double: - return ConstantNode.forDouble((Long) o, graph()); + return ConstantNode.forDouble((Double) o, graph()); default: ValueNodeUtil.shouldNotReachHere(); }
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java Fri May 03 20:26:43 2013 +0200 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/InliningPhase.java Fri May 03 20:27:45 2013 +0200 @@ -144,9 +144,6 @@ } } } - - // Clean up type profiles. - TypeProfileProxyNode.cleanFromGraph(graph); } @Override