On Fri, 2005-05-20 at 17:44 +0200, Giovanni Bajo wrote:
> Etienne Lorrain <[EMAIL PROTECTED]> wrote:
> 
> > [EMAIL PROTECTED]:~/projet/gujin$ gcc -Os tst.c -c -o tst.o && size tst.o
> >    text    data     bss     dec     hex filename
> >     261       0       0     261     105 tst.o
> > [EMAIL PROTECTED]:~/projet/gujin$ ../toolchain/bin/gcc -Os tst.c -c -o tst.o
> &&
> > size tst.o
> >    text    data     bss     dec     hex filename
> >    5339       0       0    5339    14db tst.o
> > [EMAIL PROTECTED]:~/projet/gujin$
> 
> It's another issue with SRA and -Os. With an old 4.1, I have:
> 
> $ ./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.

> 
> Please, do file a bugreport.


Reply via email to