r194403 - Using an invalid -O falls back on -O3 instead of an error

Hal Finkel hfinkel at anl.gov
Mon Nov 11 14:55:42 PST 2013


----- Original Message -----
> 
> 
> 
> Hal Finkel < hfinkel at anl.gov > writes:
> > Okay; it sounds like we need to make this a data-driven decision.
> > The
> > question is: of those codes using -O<n>, where n > 3, are they more
> > likely to be numerics-dominated codes or more-likely to be
> > control-flow-dominated codes. I remember someone posting a list
> > here
> > of # of packages (in some well-known distribution) vs. the default
> > optimization flag, so this should be an answerable question.
> 
> 
> I personally like having -Ox where x isn't something we explicitly
> handle be an error. The problem with allowing "-O99" is that it
> reinforces the "more is better" misconception. A lot of people don't
> realize that "every optimization possible" doesn't make sense - some
> optimizations conflict with another or have opposing goals.

Just to be clear, I'm also fine with it being an error.

> 
> 
> Flags like "-O2", "-O3", and "-Os" have defined semantics, whereas
> "-O99" is meaningless. The only reason, in my opinion, to accept this
> would be GCC compatibility, in which case we should just do whatever
> they do with it.

gcc treats -O<n> for n >=3 the same.

 -Hal

> That said, I'd still prefer this continue to be an
> error.
> 
> 
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the cfe-commits mailing list