[PR44248] Fix lto/whopr -g link-time -fcompare-debug failure
Richard Guenther
richard.guenther@gmail.com
Tue Jun 15 09:35:00 GMT 2010
On Tue, Jun 15, 2010 at 5:00 AM, Alexandre Oliva <aoliva@redhat.com> wrote:
> When VTA is disabled, LTO streams in debug stmts as gimple nops. This
> is inadequate, for gimple nops will get in the way of removal of blocks
> and perhaps other situations in which debug stmts are properly
> disregarded. Their presence is enough to bring about codegen
> differences, causing -fcompare-debug failures when an object file
> compiled with -g -flto is to be link-time compiled without -g, as is the
> case when -fcompare-debug is given.
>
> This patch arranges for us to drop the debug stmts entirely, but to do
> so only after applying fixups. We could drop them a bit earlier, while
> filling in the stmts array, but then we'd have to worry about NULL stmt
> entries in the array (should debug stmts have fixups) and the array
> would probably be slower, for we'd have to test MAY_HAVE_DEBUG_STMTS
> multiple times.
>
> Is this ok, if it passes regstrap on x86_64-linux-gnu?
Ok if you make input_bb return a flag whether a debug stmt was
streamed in, aggregate that and make the loop over all stmts
conditional on that to avoid walking over all stmts in a function
one more time.
Thanks,
Richard.
More information about the Gcc-patches
mailing list