This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/27357] 20 % increase code size in 4.1 vs 3.4.5
- From: "etienne_lorrain at yahoo dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 May 2006 13:22:40 -0000
- Subject: [Bug rtl-optimization/27357] 20 % increase code size in 4.1 vs 3.4.5
- References: <bug-27357-1034@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from etienne_lorrain at yahoo dot fr 2006-05-24 13:22 -------
etienne@cygne:~/projet/gujin$ /home/etienne/projet/toolchain/bin/gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/home/etienne/projet/toolchain
--enable-languages=c
Thread model: posix
gcc version 4.1.1 20060517 (prerelease)
etienne@cygne:~/projet/gujin$ /home/etienne/projet/toolchain/bin/gcc tmp1.c -Os
-c -o tmp.o && size tmp.o
text data bss dec hex filename
279 0 0 279 117 tmp.o
etienne@cygne:~/projet/gujin$ /home/etienne/projet/toolchain/bin/gcc tmp1.c -Os
-c -o tmp.o -fno-optimize-sibling-calls && size tmp.o
text data bss dec hex filename
251 0 0 251 fb tmp.o
So "tail return optimization" disabled by -fno-optimize-sibling-calls has at
least something to do with the size increase.
Note that this new GCC-4.1.1 prerelease also produce such code:
addl $12, %esp
leal -12(%ebp), %esp
pop allregs
ret
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27357