This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: rtl_loop_init vs try_redirect_by_replacing_jump vs simple jumps
- From: DJ Delorie <dj at redhat dot com>
- To: stevenb dot gcc at gmail dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 23 May 2006 17:38:33 -0400
- Subject: Re: rtl_loop_init vs try_redirect_by_replacing_jump vs simple jumps
- References: <200605230351.k4N3pKUY026394@greed.delorie.com> <571f6b510605222326k8b77078gcb38a5fd0787e9cd@mail.gmail.com> <571f6b510605222340t59c8cea3h2034cbd4ec2ba090@mail.gmail.com>
> And, I forgot to say, one of the reasons that this keeps confusing
> people is because the rtl dumps in cfglayout mode tend to look
> confusing because there is almost no CFG information in them.
How about this?
* cfgrtl.c (print_rtl_with_bb): Print predecessor and
successor edge information as well.
Index: cfgrtl.c
===================================================================
--- cfgrtl.c (revision 114014)
+++ cfgrtl.c (working copy)
@@ -1640,6 +1640,8 @@ print_rtl_with_bb (FILE *outf, rtx rtx_f
for (tmp_rtx = rtx_first; NULL != tmp_rtx; tmp_rtx = NEXT_INSN (tmp_rtx))
{
int did_output;
+ edge_iterator ei;
+ edge e;
if ((bb = start[INSN_UID (tmp_rtx)]) != NULL)
{
@@ -1647,6 +1649,12 @@ print_rtl_with_bb (FILE *outf, rtx rtx_f
bb->index);
dump_regset (bb->il.rtl->global_live_at_start, outf);
putc ('\n', outf);
+ FOR_EACH_EDGE (e, ei, bb->preds)
+ {
+ fputs (";; Pred edge ", outf);
+ dump_edge_info (outf, e, 1);
+ fputc ('\n', outf);
+ }
}
if (in_bb_p[INSN_UID (tmp_rtx)] == NOT_IN_BB
@@ -1664,6 +1672,12 @@ print_rtl_with_bb (FILE *outf, rtx rtx_f
bb->index);
dump_regset (bb->il.rtl->global_live_at_end, outf);
putc ('\n', outf);
+ FOR_EACH_EDGE (e, ei, bb->succs)
+ {
+ fputs (";; Succ edge ", outf);
+ dump_edge_info (outf, e, 1);
+ fputc ('\n', outf);
+ }
}
if (did_output)