Patch to display number of label uses when dumping RTL

Nick Clifton nickc@cygnus.com
Thu Apr 22 11:41:00 GMT 1999


Hi Guys,

  I would like permission to apply the following small patch.  It
  extends the print_rtx function so that it displays the LABEL_NUSES
  value for any labels that it prints.

Cheers
	Nick

Thu Apr 22 11:40:26 1999  Nick Clifton  <nickc@cygnus.com>

	* print-rtl.c (print_rtx): Display LABEL_NUSES for labels.

Index: print-rtl.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/print-rtl.c,v
retrieving revision 1.39
diff -p -w -r1.39 print-rtl.c
*** print-rtl.c	1999/04/02 17:28:17	1.39
--- print-rtl.c	1999/04/22 18:38:32
*************** print_rtx (in_rtx)
*** 318,323 ****
--- 318,326 ----
      }
  #endif
  
+   if (GET_CODE (in_rtx) == CODE_LABEL)
+     fprintf (outfile, " [num uses: %d]", LABEL_NUSES (in_rtx));
+   
    if (dump_for_graph
        && (is_insn || GET_CODE (in_rtx) == NOTE
  	  || GET_CODE (in_rtx) == CODE_LABEL || GET_CODE (in_rtx) == BARRIER))


More information about the Gcc-patches mailing list