changeset 6353:2590d9cc3b6d

remove unnecessary debug scope during inlining
author Lukas Stadler <lukas.stadler@jku.at>
date Tue, 11 Sep 2012 14:09:46 +0200
parents b76534871d06
children 6a324c13cfff
files graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/InliningPhase.java graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/util/InliningUtil.java
diffstat 2 files changed, 30 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/InliningPhase.java	Tue Sep 11 14:08:14 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/phases/InliningPhase.java	Tue Sep 11 14:09:46 2012 +0200
@@ -183,42 +183,36 @@
 
     @Override
     public StructuredGraph buildGraph(final ResolvedJavaMethod method) {
-
-        return Debug.scope("buildInlineGraph", this, new Callable<StructuredGraph>() {
-
-            public StructuredGraph call() {
-                metricInliningRuns.increment();
-                if (GraalOptions.CacheGraphs && cache != null) {
-                    StructuredGraph cachedGraph = cache.get(method);
-                    if (cachedGraph != null) {
-                        return cachedGraph;
-                    }
-                }
-                StructuredGraph newGraph = new StructuredGraph(method);
-                if (plan != null) {
-                    plan.runPhases(PhasePosition.AFTER_PARSING, newGraph);
-                }
-                assert newGraph.start().next() != null : "graph needs to be populated during PhasePosition.AFTER_PARSING";
+        metricInliningRuns.increment();
+        if (GraalOptions.CacheGraphs && cache != null) {
+            StructuredGraph cachedGraph = cache.get(method);
+            if (cachedGraph != null) {
+                return cachedGraph;
+            }
+        }
+        StructuredGraph newGraph = new StructuredGraph(method);
+        if (plan != null) {
+            plan.runPhases(PhasePosition.AFTER_PARSING, newGraph);
+        }
+        assert newGraph.start().next() != null : "graph needs to be populated during PhasePosition.AFTER_PARSING";
 
-                if (GraalOptions.ProbabilityAnalysis) {
-                    new DeadCodeEliminationPhase().apply(newGraph);
-                    new ComputeProbabilityPhase().apply(newGraph);
-                }
-                if (GraalOptions.OptCanonicalizer) {
-                    new CanonicalizerPhase(target, runtime, assumptions).apply(newGraph);
-                }
-                if (GraalOptions.Intrinsify) {
-                    new IntrinsificationPhase(runtime).apply(newGraph);
-                }
-                if (GraalOptions.CullFrameStates) {
-                    new CullFrameStatesPhase().apply(newGraph);
-                }
-                if (GraalOptions.CacheGraphs && cache != null) {
-                    cache.put(newGraph);
-                }
-                return newGraph;
-            }
-        });
+        if (GraalOptions.ProbabilityAnalysis) {
+            new DeadCodeEliminationPhase().apply(newGraph);
+            new ComputeProbabilityPhase().apply(newGraph);
+        }
+        if (GraalOptions.OptCanonicalizer) {
+            new CanonicalizerPhase(target, runtime, assumptions).apply(newGraph);
+        }
+        if (GraalOptions.Intrinsify) {
+            new IntrinsificationPhase(runtime).apply(newGraph);
+        }
+        if (GraalOptions.CullFrameStates) {
+            new CullFrameStatesPhase().apply(newGraph);
+        }
+        if (GraalOptions.CacheGraphs && cache != null) {
+            cache.put(newGraph);
+        }
+        return newGraph;
     }
 
     @Override
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/util/InliningUtil.java	Tue Sep 11 14:08:14 2012 +0200
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/util/InliningUtil.java	Tue Sep 11 14:09:46 2012 +0200
@@ -109,7 +109,7 @@
         }
 
         protected static StructuredGraph getGraph(final ResolvedJavaMethod concrete, final InliningCallback callback) {
-            return Debug.scope("Inlining", concrete, new Callable<StructuredGraph>() {
+            return Debug.scope("GetInliningGraph", concrete, new Callable<StructuredGraph>() {
                 @Override
                 public StructuredGraph call() throws Exception {
                     return callback.buildGraph(concrete);