r189218 - Simplify now that -O4 just maps to -O3 and -O is an alias of -O2.

Arthur O'Dwyer arthur.j.odwyer at gmail.com
Mon Aug 26 10:07:27 PDT 2013


On Mon, Aug 26, 2013 at 7:42 AM, Joerg Sonnenberger
<joerg at britannica.bec.de> wrote:
> On Mon, Aug 26, 2013 at 02:05:42PM -0000, Rafael Espindola wrote:
>> Author: rafael
>> Date: Mon Aug 26 09:05:41 2013
>> New Revision: 189218
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=189218&view=rev
>> Log:
>> Simplify now that -O4 just maps to -O3 and -O is an alias of -O2.
>
> I find that a bit surprising, given that -O should mean -O1.
> Daniel -- you changed it to mean -O2 in r82131. Any idea why?

+1 yikes! "-O" should always be a synonym for "-O1". People depend on this.

I don't have a dog in the -O4 bikeshed, but FWIW my opinion is that
-O<any number> should be silently accepted (and saturate). I liked
being able to pass "gcc -O99" to mean "Give me everything you've got",
without having to think about "ooh, version 42.7 only goes up to -O3,
and then 42.8 has -O5, and then 42.9 is back to -O4.5..." Of course
adding an "-Omax" would also deal with that use-case, if people even
thought that was important to deal with.

my $.02,
–Arthur




More information about the cfe-commits mailing list