optimization issue about -O2 and -Os

Zack Weinberg zack@codesourcery.com
Fri Apr 30 16:42:00 GMT 2004


"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



More information about the Gcc mailing list