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 17:24:45 +0100
- Subject: RE: optimization issue about -O2 and -Os
> -----Original Message-----
> From: gcc-owner On Behalf Of Zack Weinberg
> Sent: 30 April 2004 16:32
> "Dave Korn" <dk@artimi.com> writes:
>
> > Use -fverbose-asm in conjunction with --save-temps to get
> a list of the
> > optimisations in effect at the top of each assembler code
> file. Try it with
> > -Os and -O2, and note the differences between them. You
> may be able to
> > narrow it down to a specific -f flag by starting with -O2
> and introducing
> > the changes between that and -Os one at a time.
>
> There are no such flags. The -O options are *not* shorthand for
> collections of -f options; I know the documentation makes it sound
> that way. -Os in particular has direct and complex effects on code
> generation.
>
> zw
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 ?
cheers,
DaveK
--
Can't think of a witty .sigline today....