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

[Bug tree-optimization/30927] tree-nested creates pointless static chains and trampolines when the callgraph is non-trivial



------- Comment #5 from baldrick at free dot fr  2007-03-15 15:34 -------
Subject: Re:  tree-nested creates pointless static chains and trampolines when
the callgraph is non-trivial

> > Bootstraps with all languages including Ada.  Does not introduce any new
> > testsuite failures.  I'd appreciate it if the ACT people could pass it
> > through their regression test suite.  I don't know if this interacts
> > correctly with OMP because I don't understand OMP.
> 
> What would it buy us over the patch I previously posted?

If I understand right the two patches do different things.  Consider
the following example:

     void X(void) {
       void D(void) { D(); };
       D();
     }

The nested function is reachable, so presumably your patch doesn't
change the behaviour of tree-nested in this case, i.e. D gets a
static chain even though it doesn't need one.  My patch makes sure
that D doesn't get a static chain.  It doesn't try to do anything
about unreachable functions.  In fact I noticed that unreachable
functions can generate a pointless "nonlocal frame structure", but
decided not to attempt a fix because it seemed much more complicated
to do!

By the way, I see that you added a hash table for going from the
context to the nesting_info.  I was too lazy to do that, instead
I do a linear list walk to find it.  Do you think it matters?

Ciao,

Duncan.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30927


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