r189218 - Simplify now that -O4 just maps to -O3 and -O is an alias of -O2.
Rafael EspĂndola
rafael.espindola at gmail.com
Tue Sep 3 09:53:23 PDT 2013
>> This is something Chris requested, IIRC. I'm not sure I remember the
>> motivation beyond that.
>
> Two reasons:
>
> 1) -O1 doesn't actually mean anything. It is the optimization level least understood by both the GCC folks and us. Recently (last 5 years?) there has been a move to try to make this "optimize without messing up debug info", but this is a new movement.
Another thing that is making -O1 better defined is asan. It is the
optimization level that makes asan fast but still provides useful
backtraces :-)
> 2) Users who specify -O generally don't know it maps onto -O1. They almost certainly don't want whatever -O1 provides. In my experience, most are coming from Sun, HP or other compilers, where -O was a generally useful flag.
>
> 3) There are some benchmarks that pass -O (because of #2), which is ridiculous, but reflects some reality that people use -O. I don't recall what these benchmarks were.
>
> These are reasons that I suggested the change. I really don't like -O1 :-)
I haven't seen -O being used in wild, so I OK with keeping it mapping to -O2.
> -Chris
Thanks,
Rafael
More information about the cfe-commits
mailing list