changeset 5716:e4b9af013c4a

Do not created a graph if we use a cached one
author Gilles Duboscq <duboscq@ssw.jku.at>
date Thu, 28 Jun 2012 13:09:54 +0200
parents ed6142909ec8
children 1d2eeb28537f
files graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/InliningPhase.java
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/InliningPhase.java	Thu Jun 28 12:00:09 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/InliningPhase.java	Thu Jun 28 13:09:54 2012 +0200
@@ -184,7 +184,6 @@
 
     @Override
     public StructuredGraph buildGraph(final ResolvedJavaMethod method) {
-        final StructuredGraph newGraph = new StructuredGraph(method);
 
         return Debug.scope("buildInlineGraph", this, new Callable<StructuredGraph>() {
 
@@ -196,8 +195,7 @@
                         return cachedGraph;
                     }
                 }
-
-
+                StructuredGraph newGraph = new StructuredGraph(method);
                 if (plan != null) {
                     plan.runPhases(PhasePosition.AFTER_PARSING, newGraph);
                 }