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

Re: Haney's real matrix test regression

Richard Kenner wrote:

>     For sure the "O-O C++" version performed better than the "hard coded C"
>     version of the test case until a week ago, and this is the case indeed
>     the case for gcc3.0.2.
> Well, I'd say try again, since what we're seeing is C++-specific.

Sorry, but I'm even more confused.

In that C++ testsuite (it is a C++ testsuite, indeed), there are two versions
of a matrix multiplication loop: one "C++-style", which involves member
functions for indexing the matrices, the other one "C-style" wich uses simple
array indexing.

gcc3.0.2 (and 3.1 'til a few days ago, I maintain) is able to optimize the
"C++-style" case in such a way that it is even faster than the "C-style" case,
whereas the current 3.1 snapshots are not able anymore to do so.

Privately, I sent you the "C++-style" version of the test, which indeed shows
that the innermost loop is compiled radically better by 3.0.2 than current
3.1, you can confirm that??

>     You mean that your recent checkins, while improving the optimization
>     of C code have a negative impact for C++ code until some radical
>     modifications are implemented to improve C++ alias analysis?
> My changes were not to improve optimization, but to fix bugs where the
> wrong alias set was used.  I don't have any idea if a "radical modication"
> of G++ is needed to allow using normal alias sets or not since I have
> no idea why they have been disabled.  Hopefully, that's just a very
> overly-conservative test that can be refined.  For example, as written,
> it applies to all ARRAY_TYPEs, but the comment suggest it shouldn't.

I see, thanks for the explanation.


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