This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: -O more than the sum of its parts?
- From: me22 <me22 dot ca at gmail dot com>
- To: drew stortz <drew dot stortz at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 8 Mar 2010 22:43:26 -0500
- Subject: Re: -O more than the sum of its parts?
- References: <7088dd691003081924l2c75ec98tca557585304a9e73@mail.gmail.com> <7088dd691003081931w2a9c6618of759c34753b5ac8b@mail.gmail.com>
On 8 March 2010 22:31, drew stortz <drew.stortz@gmail.com> wrote:
>
> However, experiment tells me that this is far from true. When I
> compile the same c file both ways, the object file produced with -O is
> around 20% smaller than the one produced with all of the individual
> optimizations added. ÂBefore filing a bug or investigating further, I
> wanted to ask the list: is my interpretation of the -O switch
> incorrect? Is it more than just the sum of those individual
> optimizations?
>
Yes; My understanding is that all of the -O levels have features not
controllable with individual flags.