[patch] List predecessors in dump_bb

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Tue Jan 13 16:47:00 GMT 2004


Hello,

this patch adds information about predecessors into dump_bb output,
which is sometimes useful.  Commited as obvious.

Zdenek

	* cfg.c (dump_bb): Dump entry edges.

Index: cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfg.c,v
retrieving revision 1.55
diff -3 -p -r1.55 cfg.c
*** cfg.c	6 Jan 2004 16:51:10 -0000	1.55
--- cfg.c	13 Jan 2004 16:43:55 -0000
*************** dump_bb (basic_block bb, FILE *outf)
*** 966,971 ****
--- 966,975 ----
  	   bb->index, bb->loop_depth);
    fprintf (outf, HOST_WIDEST_INT_PRINT_DEC, (HOST_WIDEST_INT) bb->count);
    putc ('\n', outf);
+   fputs (";; Predecessors: ", outf);
+   for (e = bb->pred; e; e = e->pred_next)
+     dump_edge_info (outf, e, 0);
+   putc ('\n', outf);
  
    cfg_hooks->dump_bb (bb, outf);
  



More information about the Gcc-patches mailing list