On 04/12/2012 04:52 PM, Gabriel Dos Reis wrote: > On Thu, Apr 12, 2012 at 10:43 AM, Pedro Alves <pal...@redhat.com> wrote: >> On 04/12/2012 04:23 PM, Gabriel Dos Reis wrote: >> >>> because -Os says it optimizes for size, the expectation is clear. >>> -O3 does not necessarily give better optimization than -O2. >> >> >> No, but it does mean that GCC turns on more optimization options. >> >> "Optimize yet more. -O3 turns on all optimizations specified by -O2 and also >> turns on the -finline-functions, >> -funswitch-loops, -fpredictive-commoning, -fgcse-after-reload, >> -ftree-vectorize and -fipa-cp-clone options. " > > I think we have perverted the meaning of "optimize yet more", and optimize > yet more does not yield better/faster code :-)
Sure, so that phrase in the documentation could be improved/replaced, or even removed. The rest of the paragraph looks quite clear enough. > Yes, I understand the transformations; that does not justify for the awkward > user-interface. So stop thinking in terms of -O, if it helps. Maybe think in terms of -glevel? "Request debugging information and also use level to specify how much information. The default level is 2." or just consider it on its own merits: -W0 no warning options enabled. -W1, more warning options enabled than -W0. -W2, more warning options enabled than -W1. -WN, more warning options enabled than -WN-1. I fail to see why is that awkward? -- Pedro Alves