changeset 17111:881fa8b6ca9d

Merge
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Mon, 15 Sep 2014 20:06:56 -0700
parents fe935dbf9863 (current diff) dbb08e742d87 (diff)
children 4c9c347fa4da
files
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/BasePhase.java	Mon Sep 15 20:06:40 2014 -0700
+++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/BasePhase.java	Mon Sep 15 20:06:56 2014 -0700
@@ -39,6 +39,7 @@
 public abstract class BasePhase<C> {
 
     public static final int PHASE_DUMP_LEVEL = 1;
+    public static final int BEFORE_PHASE_DUMP_LEVEL = 3;
 
     private CharSequence name;
 
@@ -96,6 +97,9 @@
 
     public final void apply(final StructuredGraph graph, final C context, final boolean dumpGraph) {
         try (TimerCloseable a = timer.start(); Scope s = Debug.scope(getClass(), this); Closeable c = memUseTracker.start()) {
+            if (dumpGraph && Debug.isDumpEnabled(BEFORE_PHASE_DUMP_LEVEL)) {
+                Debug.dump(BEFORE_PHASE_DUMP_LEVEL, graph, "Before phase %s", getName());
+            }
             this.run(graph, context);
             executionCount.increment();
             inputNodesCount.add(graph.getNodeCount());