This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: identifying c++ aliasing violations
- From: Dale Johannesen <dalej at apple dot com>
- To: Giovanni Bajo <rasky at develer dot com>
- Cc: gcc at gcc dot gnu dot org, Dale Johannesen <dalej at apple dot com>, Jack Howarth <howarth at bromo dot msbb dot uc dot edu>
- Date: Mon, 5 Dec 2005 10:13:50 -0800
- Subject: Re: identifying c++ aliasing violations
- References: <20051205010733.BA5F41DC06D@bromo.msbb.uc.edu> <0d9b01c5f972$605a3640$f74a2597@bagio>
On Dec 5, 2005, at 12:03 AM, Giovanni Bajo wrote:
Jack Howarth <howarth@bromo.msbb.uc.edu> wrote:
What exactly is the implication of having a hundred or more of this in
an application being built with gcc/g++ 4.x at -O3? Does it only risk
random crashes in the generated code or does it also impact the
quality
of the generated code in terms of execution speed?
The main problem is wrong-code generation. Assuming the warning is
right and
does not mark false positives, you should have those fixed. I don't
think
quality of the generated code would be better with this change.
However, it's pretty strange that C++ code generation is worse with
GCC 4: I
saw many C++ programs which actually got much faster due to higher
lever
optimazations (such as SRA). You should really try and identify inner
loops
which might have been slowed down and submit those as bugreports in our
Bugzilla.
Could also be inlining differences, and you might check out whether
-fno-threadsafe-statics is applicable; that can make a big difference.
Bottom line, you're going to have to do some analysis to figure out
why it got slower. (It sounds like you're on a MacOSX system, in
which case Shark is a good tool for this.)