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]

[vta] fix dump_bb_header, skip debug insns


This is a cosmetical change for bb header dumps, introduced during
tuplification.  A number of times I saw uninitialized line number info
being reported, mainly for debug stmts that didn't carry line number
info (fixed in an upcoming patch).

This was wrong on two accounts: the code compared lineno with -1,
rather than with the constant used to indicate an uninitialized line
number.  Fixing that took care of most of the dump oddities.

However, I decided I didn't want differences in the initial location
in dumps because of debug stmts, so I arranged for them to be ignored
while looking for the first stmt with location information.

This patch fixes it.  I'm installing it in the vta branch.

for  gcc/ChangeLog.vta
from  Alexandre Oliva  <aoliva@redhat.com>

	* cfgexpand.c (maybe_dump_rtl_for_tree_stmt): Dump line number
	information if requested.

Index: gcc/cfgexpand.c
===================================================================
--- gcc/cfgexpand.c.orig	2008-08-12 03:45:28.000000000 -0300
+++ gcc/cfgexpand.c	2008-09-05 03:18:46.000000000 -0300
@@ -1232,7 +1232,8 @@ maybe_dump_rtl_for_tree_stmt (tree stmt,
   if (dump_file && (dump_flags & TDF_DETAILS))
     {
       fprintf (dump_file, "\n;; ");
-      print_generic_expr (dump_file, stmt, TDF_SLIM);
+      print_generic_expr (dump_file, stmt,
+			  TDF_SLIM | (dump_flags & TDF_LINENO));
       fprintf (dump_file, "\n");
 
       print_rtl (dump_file, since ? NEXT_INSN (since) : since);
-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}
FSFLA Board Member       ÂSÃ Libre! => http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}

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