From: Florian Liekweg Date: Fri, 26 Apr 2002 14:19:08 +0000 (+0000) Subject: Added exception markings to graph and cfg dumps --flo X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=a0a58582e16db9a34cbf590d12cdc80c5e32e1aa;p=libfirm Added exception markings to graph and cfg dumps --flo [r386] --- diff --git a/ir/ir/irdump.c b/ir/ir/irdump.c index f7d8708fb..0e5ba34c7 100644 --- a/ir/ir/irdump.c +++ b/ir/ir/irdump.c @@ -957,7 +957,8 @@ dump_ir_block (ir_node *block, void *env) { #else xfprintf (F, "%I", block->op->name); #endif - fprintf (F, " (%s)", exc_to_string (get_Block_exc (block))); + if (exc_normal != get_Block_exc (block)) + fprintf (F, " (%s)", exc_to_string (get_Block_exc (block))); xfprintf(F, "\" status:clustered color:%s \n", get_Block_matured (block) ? "yellow" : "red"); @@ -1033,6 +1034,10 @@ dump_block_to_cfg (ir_node *block, void *env) { /* This is a block. Dump a node for the block. */ xfprintf (F, "node: {title:\""); PRINT_NODEID(block); xfprintf (F, "\" label: \"%I ", block->op->name); PRINT_NODEID(block); + + if (exc_normal != get_Block_exc (block)) + xfprintf (F, " (%s)", exc_to_string (get_Block_exc (block))); + xfprintf (F, "\" "); if (dump_dominator_information_flag) xfprintf(F, "info1:\"dom depth %d\"", get_Block_dom_depth(block)); diff --git a/ir/ir/irnode.h b/ir/ir/irnode.h index a3dce98ee..6d4bf808a 100644 --- a/ir/ir/irnode.h +++ b/ir/ir/irnode.h @@ -19,6 +19,7 @@ # include "tv.h" # include "type.h" # include "dbginfo.h" +# include "exc.h" /* The typedefiniton of ir_node is also in irgraph.h to resolve recursion between irnode.h and irgraph.h */ @@ -156,6 +157,9 @@ inline int Block_not_block_visited(ir_node *node); inline ir_node *get_Block_graph_arr (ir_node *node, int pos); inline void set_Block_graph_arr (ir_node *node, int pos, ir_node *value); +void set_Block_exc (ir_node*, exc_t); +exc_t get_Block_exc (ir_node*); + inline int get_End_n_keepalives(ir_node *end); inline ir_node *get_End_keepalive(ir_node *end, int pos);