-fomit-frame-pointer [was: Re: XFree86 host.def]

Tushar Teredesai tush at yahoo.com
Thu Oct 3 21:46:05 PDT 2002


Greg Schafer wrote:

>On Fri, Oct 04, 2002 at 12:54:04AM +0200, Matthias Benkmann wrote:
>  
>
>>-fomit-frame-pointer. I just love it. Now all of you speed freaks will
>>have to rebuild your LFSs or live with the feeling that with all of the
>>CFLAGS fiddling not only have you sacrificed stability but you may even
>>have lost speed. ROTFL. :-)
>>
:)

>>BTW, the numbers get only a little better with -march=k6 (and adding all
>>the flags suggested in the Mozilla hint). The whole situation may be
>>different on a Pentium or with a different GCC version (I have 3.2) but
>>the point is (and this has also been mentioned on the gcc mailing list,
>>btw) that -O3 may produce much worse code than -O2.
>>
To be honest, I don't actually use those flags in my default mozilla 
build. I use "-O3 -march=i686 -fomit-framepointer -s -w" most of the 
times. I just included the flags in the hint since I could get a working 
mozilla version with it in case someone is interested in it. After the 
thread on lfs-support regarding the optimization flags, I have started 
replacing the -O3 by -O2 for some core packages.

>>The interesting thing is that the code generated for foo() is the same
>>with -O3 -fomit-frame-pointer and -O2 -fomit-frame-pointer. The difference
>>is that -O3 inlines foo() into main() but because the frame pointer of
>>main() apparently can't be omitted, the inlined code is worse because of
>>fewer available registers. So this example debunks the common myth that
>>inlining is always a good idea.
>>    
>>
>Excellent work MSB. I've been advocating the "-O3 is worse than -O2" line
>for a while now as well. But my tests weren't quite as scientific as yours,
>just some simple gzip decompression tests.
>
>So, at least one person has been listening! :)
>  
>
I have been listening too <pat pat>. Especially when hotshots like you, 
MSB, etc. mention something.

-- 
Tushar Teredesai
LFS ID: 1377
http://tushar.lfsforum.org/

-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-dev' in the subject header of the message



More information about the blfs-dev mailing list