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/8781] Pessimization of C++ (functional) code


------- Additional Comments From dnovillo at gcc dot gnu dot org  2004-08-25 13:45 -------
(In reply to comment #12)
> Diego, this is not a regression, but it would be kind to get a quick analysys 
> of what is going wrong and/or spot enhancement opportunities in alias analysys. 
> Can you allocate a little time to investigate?
>
The most likely problem is that alias analysis is being tricked into thinking
that &pred escapes because it is being squirreled away into 'pred.pred = &pred'.

Since we don't keep structures in SSA form, we immediately give up on addresses
that are stored inside a structure.  Alias analysis sees the store and says 'oh,
I don't know where else that may go so I will just assume that it escapes'. 
There's a FIXME in tree-ssa-alias.c precisely because of this.

Implementing a full-fledge escape analysis framework would probably cure this. 
There may also be in-between solutions to achieve some of the lower hanging fruit.


Diego.

-- 


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


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