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: Zack Weinberg <zack at codesourcery dot com>
- To: "Dave Korn" <dk at artimi dot com>
- Cc: "'gcc_mailing_list'" <gcc at gcc dot gnu dot org>
- Date: Fri, 30 Apr 2004 09:59:51 -0700
- Subject: Re: optimization issue about -O2 and -Os
- References: <NUTMEGQzBxhJTANZwwP0000010e@NUTMEG.CAM.ARTIMI.COM>
"Dave Korn" <dk@artimi.com> 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