Merged r5509 from trunk:
authoredwin <none@none>
Thu, 28 Sep 2006 19:30:03 +0000 (19:30 +0000)
committeredwin <none@none>
Thu, 28 Sep 2006 19:30:03 +0000 (19:30 +0000)
* src/vm/jit/show.c (new_show_basicblock): Print predecessors only for
stage >= SHOW_CFG.
* src/vm/jit/show.h (SHOW_CFG): Defined.

--HG--
branch : unified_variables

src/vm/jit/show.c
src/vm/jit/show.h

index 6dd53210f3309995aff1e45301a9c607a3e82847..6a168c46b8ea8ac8c5c36fcc593b5268cfa1b888 100644 (file)
@@ -423,13 +423,18 @@ void new_show_basicblock(jitdata *jd, basicblock *bptr, int stage)
                        break;
                }
 
-               printf(", icount: %d, preds: %d [ ",
-                          bptr->icount, bptr->predecessorcount);
+               printf(", icount: %d", bptr->icount);
 
-               for (i = 0; i < bptr->predecessorcount; i++)
-                       printf("%d ", bptr->predecessors[i]->nr);
+               if (stage >= SHOW_CFG) {
+                       printf(", preds: %d [ ", bptr->predecessorcount);
 
-               printf("]):");
+                       for (i = 0; i < bptr->predecessorcount; i++)
+                               printf("%d ", bptr->predecessors[i]->nr);
+
+                       printf("]");
+               }
+
+               printf("):\n");
 
                if (bptr->original)
                        printf(" (clone of L%03d)", bptr->original->nr);
index 0cb488016035472495ca544d60ef43be37ae7edc..e82d3ff1c0bfb2b3bb5940b35144d1c9d4efc445 100644 (file)
@@ -1,4 +1,4 @@
-/* vm/jit/show.h - showing the intermediate representation
+/* src/vm/jit/show.h - showing the intermediate representation
 
    Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
    C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
 
 #include "vm/jit/jit.h"
 
+
+/* compiler stage defines *****************************************************/
+
 #define SHOW_INSTRUCTIONS  0
 #define SHOW_PARSE         1
 #define SHOW_STACK         2
-#define SHOW_REGS          3
-#define SHOW_CODE          4
+#define SHOW_CFG           3
+#define SHOW_REGS          4
+#define SHOW_CODE          5
+
+
+/* function prototypes ********************************************************/
 
 #if !defined(NDEBUG)
 extern char *show_jit_type_names[];