This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ compile-time regressions (was: GCC 3.0.1 Status Report)
- To: Joe Buck <jbuck at synopsys dot COM>
- Subject: Re: C++ compile-time regressions (was: GCC 3.0.1 Status Report)
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: Tue, 24 Jul 2001 13:25:10 -0400
- Cc: pfeifer at dbai dot tuwien dot ac dot at (Gerald Pfeifer),mark at codesourcery dot com (Mark Mitchell),gcc at gcc dot gnu dot org (gcc at gcc dot gnu dot org)
- References: <200107241708.KAA08101@atrus.synopsys.com>
Joe Buck <jbuck@synopsys.COM> writes:
>> I'm rather sure, though, that g++ is not generating efficient code for
>> complicated, nested STL and STL-like structures in the presence of
>> libstdc++-v3 (iterators are now classes instead of pointers).
>
> But the classes have one member, so we should still be getting equivalent
> code, provided that we get ADDRESSOF working as well as it did in
> 2.95.x.
Not necessarily.
Alias analysis for classes says they can alias anything (It puts them
in set 0).
Alias analysis for pointers doesn't.
This can screw us considerably in these cases, since optimizations on
memory will see they can alias everything, and not touch them (or
anything before them, since we have to kill those too).
The reason i started to come up with a patch in the first place to fix
this is because it's quite visible with store motion fixed.
--Dan
--
"The other day, I was walking my dog around my building... on
the ledge. Some people are afraid of heights. Not me, I'm
afraid of widths.
"-Steven Wright