changeset 2810:6fb5a1bf819f

Hide back edges from the output.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Mon, 30 May 2011 15:03:04 +0200
parents b003ea36fa12
children 03027a0ef819 d27bdbec3d67
files graal/GraalCompiler/src/com/sun/c1x/debug/IdealGraphPrinter.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/debug/IdealGraphPrinter.java	Mon May 30 14:55:09 2011 +0200
+++ b/graal/GraalCompiler/src/com/sun/c1x/debug/IdealGraphPrinter.java	Mon May 30 15:03:04 2011 +0200
@@ -28,6 +28,7 @@
 
 import com.oracle.graal.graph.*;
 import com.oracle.max.graal.schedule.*;
+import com.sun.c1x.ir.*;
 
 /**
  * Generates a representation of {@link Graph Graphs} that can be visualized and inspected with the <a
@@ -199,7 +200,11 @@
         stream.printf("   <block name='%d'>%n", block.blockID());
         stream.printf("    <successors>%n");
         for (Block sux : block.getSuccessors()) {
-            stream.printf("     <successor name='%d'/>%n", sux.blockID());
+            if (sux.firstNode() instanceof LoopBegin && block.lastNode() instanceof LoopEnd) {
+                // Skip back edges.
+            } else {
+                stream.printf("     <successor name='%d'/>%n", sux.blockID());
+            }
         }
         stream.printf("    </successors>%n");
         stream.printf("    <nodes>%n");