This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: optimization issue about -O2 and -Os
- From: "Dave Korn" <dk at artimi dot com>
- To: "'gcc_mailing_list'" <gcc at gcc dot gnu dot org>
- Date: Fri, 30 Apr 2004 18:21:26 +0100
- Subject: RE: optimization issue about -O2 and -Os
> -----Original Message-----
> From: Zack Weinberg
> Sent: 30 April 2004 18:00
> "Dave Korn" <> writes:
>
> >
> > Ah, I stand corrected. Would it be accurate to say that
> they are _both_
> > shorthand for a set of -f options _and_ _also_ control a
> set of other
> > behaviours, which entail enabling, disabling, or
> fine-tuning the parameters
> > of other optimisations that do not correspond directly to
> -f options ?
>
> Yeah, that's pretty accurate. You can look through the source code
> for instances of the global flags "optimize" and "optimize_size".
> Anything you can do to improve the documentation in this regard would
> be much appreciated. It would probably be a good move to deemphasize
> all those -f switches; they tend not to be all that useful; I consider
> their primary purpose to be working around bugs in specific
> optimizations, using -On -fno-<buggy-pass>.
>
> zw
Hmm, maybe it would be worthwhile to invent -f options for all these
ad-hoc tests on the optimize variables, so that the -O options then *did*
become shorthand for flag sets, and the suggestion I already made for
localising the failure with a given -O setting would actually work?
cheers,
DaveK
--
Can't think of a witty .sigline today....