This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/8781] Pessimization of C++ (functional) code
- From: "dnovillo at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Aug 2004 13:45:39 -0000
- Subject: [Bug tree-optimization/8781] Pessimization of C++ (functional) code
- References: <20021202022601.8781.wesslen@users.sourceforge.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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