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 08:32:16 -0700
- Subject: Re: optimization issue about -O2 and -Os
- References: <NUTMEGOVzpWDZ838zOi000000f0@NUTMEG.CAM.ARTIMI.COM>
"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