Optimizations when compiling the compiler.

Steve Snyder ssnyder@indy.net
Thu Sep 3 07:13:00 GMT 1998


On Thu, 3 Sep 1998 02:39:09 +0200, Marc Lehmann wrote:

>On Wed, Sep 02, 1998 at 08:13:29PM -0500, Steve Snyder wrote:
>> In a recent message it was noted that the most dramatic improvements to
>> Pentium-optimized code require the -O5 and -O6 switches.  This makes me
>> wonder:  what optimization setting were used in testing the pgcc 1.1
>> release candidates?
>> 
>> I spend a *lot* of time running my C compiler, so naturally I want it to
>> run as fast as possible.  Also, naturally, I want the compiler to be
>> stable.  I get enough instability in my own code.  :-)
>> 
>> So... how risky is it for me to compile pgcc 1.1a with itself, using the
>> -O5 or -O6 optimization switches?  That is, how much would I be reducing 
>> the dependability of compiler, as opposed to building it with itself at an 
>> optimization level of -O3 or -O4?
>
>I've run, for years, an -O6 -fno-omit-frame-pointer optimized version, until
>I forgot about it.
>
>then it bite me, sicne then, I compile pgcc with -V2.7.2 -O2. I also don't
>support compilers compiled with -O6, the chance of them being broken
>(undebuggable..) is too high.
>
>I believe it should be quite safe to use -O6 on pgcc in the 1.0/1.1
>releases, but don't count on that...

Hmm, that brings to mind an additional test for the next round of egcs/pgcc
testing: run the testsuite with a self-compiled compiler.  That is, use the
release candidate to build itself, then run the testsuite against that 2nd 
generation of compiler binaries.

This would increase the chances of any bugs being discovered because the 
flawed compiler would presumablely generate flawed code for the testsuite.

What do you think?



***** Steve Snyder *****




More information about the Gcc mailing list