This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [vta] fix dump_bb_header, skip debug insns
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 10 Sep 2008 04:16:14 -0300
- Subject: Re: [vta] fix dump_bb_header, skip debug insns
- References: <ory720h3vz.fsf@oliva.athome.lsd.ic.unicamp.br>
On Sep 10, 2008, Alexandre Oliva <aoliva@redhat.com> wrote:
> 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.
Sorry, wrong patch upthread. The description above applies to the
patch below, that I have just checked in.
for gcc/ChangeLog.vta
from Alexandre Oliva <aoliva@redhat.com>
* gimple-pretty-print.c (dump_bb_header): Don't take line info
from debug stmt.
Index: gcc/gimple-pretty-print.c
===================================================================
--- gcc/gimple-pretty-print.c.orig 2008-09-05 03:09:43.000000000 -0300
+++ gcc/gimple-pretty-print.c 2008-09-05 03:09:51.000000000 -0300
@@ -1655,7 +1655,8 @@ dump_bb_header (pretty_printer *buffer,
gimple_stmt_iterator gsi;
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
- if (get_lineno (gsi_stmt (gsi)) != -1)
+ if (!IS_DEBUG_STMT (gsi_stmt (gsi))
+ && get_lineno (gsi_stmt (gsi)) != UNKNOWN_LOCATION)
{
pp_string (buffer, ", starting at line ");
pp_decimal_int (buffer, get_lineno (gsi_stmt (gsi)));
--
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}