This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Better debug info by substitution tracking for inliner (and other passes eliminating whole user variables)
- From: Richard Guenther <rguenther at suse dot de>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc at gcc dot gnu dot org, dan at debian dot org, Martin Jambor <mjambor at suse dot de>, aoliva at redhat dot com, Michael Matz <matz at suse dot de>
- Date: Thu, 5 Mar 2009 12:06:04 +0100 (CET)
- Subject: Re: [RFC] Better debug info by substitution tracking for inliner (and other passes eliminating whole user variables)
- References: <20090305105431.GD32299@kam.mff.cuni.cz> <alpine.LNX.2.00.0903051203330.10965@zhemvz.fhfr.qr>
On Thu, 5 Mar 2009, Richard Guenther wrote:
> On Thu, 5 Mar 2009, Jan Hubicka wrote:
>
> > Hi,
> > this patch resulted from attempt to solve regression we have in
> > gdb.opt/inline-locals.exp gdb testsuite and also problems with fact that when
> > clonning function by ipa-cp we lose any information on function argument.
> > (and yes, it solves it)
> >
> > The gdb.opt/inline-locals.exp testsuite shows common pattern
> >
> > func (argument)
> > {
> > }
> >
> > otherfunc (otherargument)
> > {
> > func (otherargument);
> > }
> >
> > Where we now fully replace ARGUMENT by OTHERARGUMENT when inlining while older
> > compilers actually substituted backwards, so ARGUMENT was available while
> > OTHERARGUMENT was not. This is quite irritating behaviour when trying to
> > debug since parameters of inlined functions tends to be lost.
> >
> > The patch adds mechanizm for tracking inline substitutions, so we
> > actually note that on whole scope of its existence ARGUMENT is having
> > same value as OTHERARGUMENT. This is represented by extending
> > NONLOCALIZED_VAR vector to contain optimized out declaration and it's
> > replacement
>
> ...
>
> This sounds like a simplified (only track parameter "coalescing") form
> of what we implemented on var-mappings-branch. As I see it would
> work well for wrapper functions, or rather in case either name ends
> up completely unused but will "break" once uses of both names
> persist. So, do you see any practical use besides C++ wrapper
> functions? Is it worth fixing them?
Btw, instead of trying to keep trees live and valid why not finally
start generating dwarf at the point we lose this information?
Richard.