On Sat, Mar 15, 2003 at 03:41:53PM +0000, Dhruba Bandopadhyay wrote: > Here is my cflag variable. > > CFLAGS="-march=pentium4 -O3 -pipe -fomit-frame-pointer" > > (1) According to the CFlags Central thread on forums and the gcc manual > optimisations page (link [1]) the -O3 flag includes the > -fomit-frame-pointer optimisation. Is this right? If so, why are there > recommendations to include it in addition to -O3 (link [2&3]?
http://freshmeat.net/articles/view/730/ "-O1, which turns on ... [ some flags ] ... -fomit-frame-pointer (only on if the machine can debug without a frame pointer; otherwise, you need to specify)" > [1]http://gcc.gnu.org/onlinedocs/gcc-3.2.2/gcc/Optimize-Options.html#Optimize%20Options > [2]http://www.freehackers.org/gentoo/gccflags/flag_gcc3.html (stable) > [3]http://www.freehackers.org/gentoo/gccflags/flag_gcc3opt.html > (experimental) > > (2) How can I make my Cflag above more aggressive to give better > performance? At the moment, it is quite basic and safe but I'm pretty > sure more can be done with it. Anyone have a P4 and can vouch for > additional optimisations? You can't optimize any more than you already are without turning on flags which will probably only adversely effect your system. According to the gcc man page, OPTIMIZATIONS section: "-O2: GCC performs nearly all supported optimizations that do not involve a space-speed tradeoff." and "-O3 turns on all optimizations specified by -O2 and also turns on the -finline-functions and -frename-registers options." -- [EMAIL PROTECTED] mailing list
