This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -Os is weak...
On Fri, 10 Sep 2010, Steven Bosscher wrote:
>> The docs say...
>>
>> @item -Os
>> @opindex Os
>> Optimize for size. ?@option{-Os} enables all @option{-O2} optimizations that
>> do not typically increase code size. ?It also performs further
>> optimizations designed to reduce code size.
>>
>> @option{-Os} disables the following optimization flags:
>> @gccoptlist{-falign-functions ?-falign-jumps ?-falign-loops @gol
>> -falign-labels ?-freorder-blocks ?-freorder-blocks-and-partition @gol
>> -fprefetch-loop-arrays ?-ftree-vect-loop-version}
> What you quote above, from the documentation, is also actually
> incomplete. The -Os option also enables optimizations that are not
> performed at -O[123], e.g. code hoisting only runs at -Os (see
> gcse.c:pass_rtl_hoist).
Any chance you could update the documentation, Steven or DJ?
Gerald