GCC-4.0 vs GCC-3.3.6 ia32 -Os: code size increase from 261 to5339 bytes
Giovanni Bajo
rasky@develer.com
Sun May 22 05:09:00 GMT 2005
Daniel Berlin <dberlin@dberlin.org> wrote:
>> $ ./xgcc -c -Os -B. btst.c && size btst.o
>> text data bss dec hex filename
>> 5339 0 0 5339 14db btst.o
>> $ ./xgcc -c -Os -fno-tree-sra -B. btst.c && size btst.o
>> text data bss dec hex filename
>> 224 0 0 224 e0 btst.o
>>
>> So we're actually better than 3.3, after we disable -ftree-sra. I
>> guess SRA should be tuned (disabled?) for -Os.
>
> Structure aliasing should be able to make up for turning off SRA, i'm
> guessing, at least as far as propagating constants and DCE is
> concerned.
>
> You could test this by seeing if -fno-tree-sra -fno-tree-salias
> produces
> an increased code size over the above.
Not really: with -fno-tree-salias I get exactly the same result (224 bytes).
Giovanni Bajo
More information about the Gcc
mailing list