print_rtx whitespace tweaks

Andreas Schwab schwab@suse.de
Mon Jun 17 08:11:00 GMT 2002


Some whitespace tweaks to make output a bit more pretty.

2002-06-17  Andreas Schwab  <schwab@suse.de>

	* print-rtl.c (print_rtx): Print space before vector, not after.
	(debug_rtx): Clear sawclose before printing.
	(debug_rtx_list): Print newline after each list element.
	(debug_rtx_range): Likewise.

Index: print-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/print-rtl.c,v
retrieving revision 1.82
diff -u -p -a -u -p -a -r1.82 print-rtl.c
--- print-rtl.c	10 Jun 2002 21:50:08 -0000	1.82
+++ print-rtl.c	17 Jun 2002 14:06:32 -0000
@@ -323,7 +323,7 @@ print_rtx (in_rtx)
 		     print_rtx_head, indent * 2, "");
 	    sawclose = 0;
 	  }
-	fputs ("[ ", outfile);
+	fputs (" [", outfile);
 	if (NULL != XVEC (in_rtx, i))
 	  {
 	    indent += 2;
@@ -338,7 +338,7 @@ print_rtx (in_rtx)
 	if (sawclose)
 	  fprintf (outfile, "\n%s%*s", print_rtx_head, indent * 2, "");
 
-	fputs ("] ", outfile);
+	fputs ("]", outfile);
 	sawclose = 1;
 	indent -= 2;
 	break;
@@ -616,6 +616,7 @@ debug_rtx (x)
      rtx x;
 {
   outfile = stderr;
+  sawclose = 0;
   print_rtx (x);
   fprintf (stderr, "\n");
 }
@@ -652,7 +653,10 @@ debug_rtx_list (x, n)
       }
 
   for (i = count, insn = x; i > 0 && insn != 0; i--, insn = NEXT_INSN (insn))
-    debug_rtx (insn);
+    {
+      debug_rtx (insn);
+      fprintf (stderr, "\n");
+    }
 }
 
 /* Call this function to print an rtx list from START to END inclusive.  */
@@ -664,6 +668,7 @@ debug_rtx_range (start, end)
   while (1)
     {
       debug_rtx (start);
+      fprintf (stderr, "\n");
       if (!start || start == end)
 	break;
       start = NEXT_INSN (start);

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Gcc-patches mailing list