This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC-4.0 vs GCC-3.3.6 ia32 -Os: code size increase from 261 to 5339 bytes
- From: "Giovanni Bajo" <rasky at develer dot com>
- To: "Etienne Lorrain" <etienne_lorrain at yahoo dot fr>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Fri, 20 May 2005 17:44:57 +0200
- Subject: Re: GCC-4.0 vs GCC-3.3.6 ia32 -Os: code size increase from 261 to 5339 bytes
- References: <20050520145505.52007.qmail@web26903.mail.ukl.yahoo.com>
Etienne Lorrain <etienne_lorrain@yahoo.fr> wrote:
> etienne@cygne:~/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
> etienne@cygne:~/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
> etienne@cygne:~/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.
Please, do file a bugreport.
--
Giovanni Bajo