xfprintf (F, CF_EDGE_ATTR);
break;
case iro_Start: break;
- case iro_End: break;
+ case iro_End:
+ if (to >= 0) {
+ if (get_irn_mode(get_End_keepalive(from, to)) == mode_R)
+ xfprintf (F, CF_EDGE_ATTR);
+ if (get_irn_mode(get_End_keepalive(from, to)) == mode_X)
+ xfprintf (F, MEM_EDGE_ATTR);
+ }
+ break;
case iro_Jmp: break;
case iro_Cond: break;
case iro_Return:
void
dump_cfg (ir_graph *irg)
{
- int rem = dump_dominator_information_flag;
+ ir_graph *rem = current_ir_graph;
+ int ddif = dump_dominator_information_flag;
+ current_ir_graph = irg;
vcg_open (irg, "-cfg");
if (get_irg_dom_state(irg) != dom_consistent)
/* walk over the blocks in the graph */
irg_block_walk(irg->end, dump_block_to_cfg, NULL, NULL);
- dump_dominator_information_flag = rem;
+ dump_dominator_information_flag = ddif;
vcg_close();
+ current_ir_graph = rem;
}