Mercurial > hg > graal-compiler
changeset 19320:49605c649beb
Merge.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 12 Feb 2015 15:20:14 +0100 |
parents | 5664cadb3cee (diff) de5ef2d5498f (current diff) |
children | 98592ae4b1fa |
files | |
diffstat | 7 files changed, 31 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledNmethod.java Thu Feb 12 13:42:11 2015 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledNmethod.java Thu Feb 12 15:20:14 2015 +0100 @@ -47,4 +47,9 @@ this.id = compResult.getId(); this.ctask = ctask; } + + @Override + public String toString() { + return getClass().getSimpleName() + "[" + id + ":" + method.format("%H.%n(%p)%r@") + entryBCI + "]"; + } }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledRuntimeStub.java Thu Feb 12 13:42:11 2015 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledRuntimeStub.java Thu Feb 12 15:20:14 2015 +0100 @@ -51,7 +51,13 @@ * Checks the conditions a compilation must satisfy to be installed as a RuntimeStub. */ private boolean checkStubInvariants(CompilationResult compResult) { - assert compResult.getExceptionHandlers().isEmpty(); + assert compResult.getExceptionHandlers().isEmpty() : this; + + // Stubs cannot be recompiled so they cannot be compiled with + // assumptions and there is no point in recording evol_method dependencies + assert compResult.getAssumptions().isEmpty() : "stubs should not use assumptions: " + this; + assert compResult.getMethods().isEmpty() : "stubs should not record evol_method dependencies: " + this; + for (DataPatch data : compResult.getDataPatches()) { if (data.reference instanceof ConstantReference) { ConstantReference ref = (ConstantReference) data.reference;
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/ForeignCallStub.java Thu Feb 12 13:42:11 2015 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/ForeignCallStub.java Thu Feb 12 15:20:14 2015 +0100 @@ -192,6 +192,7 @@ boolean isObjectResult = linkage.getOutgoingCallingConvention().getReturn().getKind() == Kind.Object; StructuredGraph graph = new StructuredGraph(toString(), null, AllowAssumptions.NO); + graph.disableMethodRecording(); GraphKit kit = new HotSpotGraphKit(graph, providers); ParameterNode[] params = createParameters(kit, args);
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/Stub.java Thu Feb 12 13:42:11 2015 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/Stub.java Thu Feb 12 15:20:14 2015 +0100 @@ -157,7 +157,12 @@ if (code == null) { try (Scope d = Debug.sandbox("CompilingStub", DebugScope.getConfig(), providers.getCodeCache(), debugScopeContext())) { final StructuredGraph graph = getGraph(); + + // Stubs cannot be recompiled so they cannot be compiled with + // assumptions and there is no point in recording evol_method dependencies assert graph.getAssumptions() == null; + assert !graph.isMethodRecordingEnabled() : graph; + if (!(graph.start() instanceof StubStartNode)) { StubStartNode newStart = graph.add(new StubStartNode(Stub.this)); newStart.setStateAfter(graph.start().stateAfter());
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java Thu Feb 12 13:42:11 2015 +0100 +++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/InliningUtil.java Thu Feb 12 15:20:14 2015 +0100 @@ -373,6 +373,11 @@ assert inlineGraph.getAssumptions() == null : "cannot inline graph which makes assumptions into a graph that doesn't: " + inlineGraph + " -> " + graph; } + // Copy method dependencies from inlinee to caller + if (inlineGraph.isMethodRecordingEnabled() && graph.isMethodRecordingEnabled()) { + graph.getMethods().addAll(inlineGraph.getMethods()); + } + return duplicates; }
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Thu Feb 12 13:42:11 2015 +0100 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/ReplacementsImpl.java Thu Feb 12 15:20:14 2015 +0100 @@ -610,6 +610,10 @@ // Replacements cannot have optimistic assumptions since they have // to be valid for the entire run of the VM. final StructuredGraph graph = new StructuredGraph(methodToParse, AllowAssumptions.NO); + + // They will also never be never be evolved or have breakpoints set in them + graph.disableMethodRecording(); + try (Scope s = Debug.scope("buildInitialGraph", graph)) { MetaAccessProvider metaAccess = replacements.providers.getMetaAccess();
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java Thu Feb 12 13:42:11 2015 +0100 +++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/SnippetTemplate.java Thu Feb 12 15:20:14 2015 +0100 @@ -566,6 +566,10 @@ // Copy snippet graph, replacing constant parameters with given arguments final StructuredGraph snippetCopy = new StructuredGraph(snippetGraph.name, snippetGraph.method(), AllowAssumptions.NO); + if (!snippetGraph.isMethodRecordingEnabled()) { + snippetCopy.disableMethodRecording(); + } + Map<Node, Node> nodeReplacements = Node.newIdentityMap(); nodeReplacements.put(snippetGraph.start(), snippetCopy.start());