This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rtl_loop_init vs try_redirect_by_replacing_jump vs simple jumps


> 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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]