changeset 15995:66fe80527060

[inliner] both parts of what used to be a single method now invoked in sequence
author Miguel Garcia <miguel.m.garcia@oracle.com>
date Mon, 02 Jun 2014 17:00:17 +0200
parents 1b07ca2f6c39
children a27eceb10d33
files graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/info/elem/InlineableGraph.java
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/info/elem/InlineableGraph.java	Mon Jun 02 16:53:23 2014 +0200
+++ b/graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/info/elem/InlineableGraph.java	Mon Jun 02 17:00:17 2014 +0200
@@ -42,7 +42,8 @@
     private final StructuredGraph graph;
 
     public InlineableGraph(final ResolvedJavaMethod method, final Invoke invoke, final HighTierContext context, CanonicalizerPhase canonicalizer) {
-        this.graph = buildGraph(method, invoke, context, canonicalizer);
+        this.graph = buildGraph(method, context, canonicalizer);
+        specializeGraphToArguments(this.graph, invoke, context, canonicalizer);
     }
 
     /**
@@ -60,19 +61,14 @@
         return null;
     }
 
-    private static StructuredGraph buildGraph(final ResolvedJavaMethod method, final Invoke invoke, final HighTierContext context, CanonicalizerPhase canonicalizer) {
+    private static StructuredGraph buildGraph(final ResolvedJavaMethod method, final HighTierContext context, CanonicalizerPhase canonicalizer) {
         StructuredGraph newGraph = getOriginalGraph(method, context);
         if (newGraph == null) {
             newGraph = parseBytecodes(method, context, canonicalizer);
         }
-        newGraph = newGraph.copy();
-
         // TODO (chaeubl): copying the graph is only necessary if it is modified or if it contains
         // any invokes
-
-        specializeGraphToArguments(newGraph, invoke, context, canonicalizer);
-
-        return newGraph;
+        return newGraph.copy();
     }
 
     /**