This is the mail archive of the gcc@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]

Re: [RFC] Better debug info by substitution tracking for inliner (and other passes eliminating whole user variables)


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.


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