X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firdump.c;h=b1344e2b6505f9d91e205431206e53ab862b6581;hb=3e83d9824a9cf1b7c6a59caf436c1d0c5a63b869;hp=0b6b800be1cb2dcf9ec4422f94f9833800713801;hpb=10e8d8749b8740ef7e585698cc254dc2e9fbaae8;p=libfirm diff --git a/ir/ir/irdump.c b/ir/ir/irdump.c index 0b6b800be..b1344e2b6 100644 --- a/ir/ir/irdump.c +++ b/ir/ir/irdump.c @@ -536,20 +536,10 @@ static int node_floats(ir_node *n) { * Walker that visits the anchors */ static void ird_walk_graph(ir_graph *irg, irg_walk_func *pre, irg_walk_func *post, void *env) { - irg_walk_graph(irg, pre, post, env); - if (dump_anchors) { - int i; - - for (i = anchor_max - 1; i >= 0; --i) { - ir_node *n = irg->anchors[i]; - - if (n) { - /* reset the visit flag: will be increase in the walker */ - set_irg_visited(irg, get_irg_visited(irg) - 1); - irg_walk(n, pre, post, env); - } - } + irg_walk_anchors(irg, pre, post, env); + } else { + irg_walk_graph(irg, pre, post, env); } } @@ -1410,7 +1400,7 @@ print_data_edge_vcgattr(FILE *F, ir_node *from, int to) { * do not use get_nodes_block() here, will fail * if the irg is not pinned. */ - if (get_irn_n(from, -1) == get_irn_n(get_irn_n(from, to), -1)) + if (get_nodes_block(from) == get_nodes_block(get_irn_n(from, to))) fprintf(F, INTRA_DATA_EDGE_ATTR); else fprintf(F, INTER_DATA_EDGE_ATTR); @@ -1422,14 +1412,14 @@ print_mem_edge_vcgattr(FILE *F, ir_node *from, int to) { * do not use get_nodes_block() here, will fail * if the irg is not pinned. */ - if (get_irn_n(from, -1) == get_irn_n(get_irn_n(from, to), -1)) + if (get_nodes_block(from) == get_nodes_block(get_irn_n(from, to))) fprintf(F, INTRA_MEM_EDGE_ATTR); else fprintf(F, INTER_MEM_EDGE_ATTR); } -static void -print_edge_vcgattr(FILE *F, ir_node *from, int to) { +/** Print the vcg attributes for the edge from node from to it's to's input */ +static void print_edge_vcgattr(FILE *F, ir_node *from, int to) { assert(from); if (dump_edge_vcgattr_hook) @@ -1447,11 +1437,14 @@ print_edge_vcgattr(FILE *F, ir_node *from, int to) { case iro_End: if (to >= 0) { if (get_irn_mode(get_End_keepalive(from, to)) == mode_BB) - fprintf(F, CF_EDGE_ATTR); - if (get_irn_mode(get_End_keepalive(from, to)) == mode_X) - fprintf(F, INTER_MEM_EDGE_ATTR); + fprintf(F, KEEP_ALIVE_CF_EDGE_ATTR); + else + fprintf(F, KEEP_ALIVE_DF_EDGE_ATTR); } break; + case iro_Anchor: + fprintf(F, ANCHOR_EDGE_ATTR); + break; default: if (is_Proj(from)) { if (get_irn_mode(from) == mode_M) @@ -1470,9 +1463,8 @@ print_edge_vcgattr(FILE *F, ir_node *from, int to) { } } -/* dump edges to our inputs */ -static void -dump_ir_data_edges(FILE *F, ir_node *n) { +/** dump edges to our inputs */ +static void dump_ir_data_edges(FILE *F, ir_node *n) { int i; unsigned long visited = get_irn_visited(n); @@ -2200,6 +2192,7 @@ void dump_vcg_header(FILE *F, const char *name, const char *orientation) { "classname 17: \"interblock Memory\"\n" "classname 18: \"Exception Control Flow for Interval Analysis\"\n" "classname 19: \"Postdominators\"\n" + "classname 20: \"Keep Alive\"\n" "infoname 1: \"Attribute\"\n" "infoname 2: \"Verification errors\"\n" "infoname 3: \"Debug info\"\n",