This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/81625] GCC v4.7 ... v8 is bloating code by > 25% compared to v3.4
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 01 Aug 2017 11:22:09 +0000
- Subject: [Bug rtl-optimization/81625] GCC v4.7 ... v8 is bloating code by > 25% compared to v3.4
- Auto-submitted: auto-generated
- References: <bug-81625-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81625
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Numbers for i586:
rguenther@murzim:/tmp> /space/rguenther/install/gcc-3.4.6/bin/gcc -c t.c -Os
-ffunction-sections -m32 -Wa,-32; size t.o
t.c:0: warning: `t.gcda' is version `408*', expected version `304*'
text data bss dec hex filename
855 0 0 855 357 t.o
rguenther@murzim:/tmp> /space/rguenther/install/gcc-4.0.4/bin/gcc -c t.c -Os
-ffunction-sections -m32 -Wa,-32; size t.o
t.c:1: warning: ‘t.gcda’ is version ‘408*’, expected version ‘400*’
text data bss dec hex filename
860 0 0 860 35c t.o
rguenther@murzim:/tmp> /space/rguenther/install/gcc-4.1.2/bin/gcc -c t.c -Os
-ffunction-sections -m32 -Wa,-32; size t.o
t.c:1: warning: ‘t.gcda’ is version ‘408*’, expected version ‘401*’
text data bss dec hex filename
874 0 0 874 36a t.o
rguenther@murzim:/tmp> /space/rguenther/install/gcc-4.2.4/bin/gcc -c t.c -Os
-ffunction-sections -m32 -Wa,-32; size t.o
t.c:1: warning: 't.gcda' is version '408*', expected version '402*'
text data bss dec hex filename
855 0 0 855 357 t.o
rguenther@murzim:/tmp> /space/rguenther/install/gcc-4.3.6/bin/gcc -c t.c -Os
-ffunction-sections -m32 -Wa,-32; size t.o
t.c:1: warning: 't.gcda' is version '408*', expected version '403*'
text data bss dec hex filename
894 0 0 894 37e t.o
rguenther@murzim:/tmp> /space/rguenther/install/gcc-4.4.7/bin/gcc -c t.c -Os
-ffunction-sections -m32 -Wa,-32; size t.o
text data bss dec hex filename
889 0 0 889 379 t.o
rguenther@murzim:/tmp> /space/rguenther/install/gcc-4.5.4/bin/gcc -c t.c -Os
-ffunction-sections -m32 -Wa,-32; size t.o
text data bss dec hex filename
893 0 0 893 37d t.o
rguenther@murzim:/tmp> /space/rguenther/install/gcc-4.6.4/bin/gcc -c t.c -Os
-ffunction-sections -m32 -Wa,-32; size t.o
text data bss dec hex filename
1118 0 0 1118 45e t.o
rguenther@murzim:/tmp> /space/rguenther/install/gcc-4.7.2/bin/gcc -c t.c -Os
-ffunction-sections -m32 -Wa,-32; size t.o
text data bss dec hex filename
1010 0 0 1010 3f2 t.o
rguenther@murzim:/tmp> /space/rguenther/install/gcc-4.9.2/bin/gcc -c t.c -Os
-ffunction-sections -m32 -Wa,-32; size t.o
text data bss dec hex filename
1007 0 0 1007 3ef t.o
rguenther@murzim:/tmp> /space/rguenther/install/gcc-5.2/bin/gcc -c t.c -Os
-ffunction-sections -m32 -Wa,-32; size t.o
text data bss dec hex filename
998 0 0 998 3e6 t.o
rguenther@murzim:/tmp> /space/rguenther/install/gcc-6.4/bin/gcc -c t.c -Os
-ffunction-sections -m32 -Wa,-32; size t.o
text data bss dec hex filename
998 0 0 998 3e6 t.o
rguenther@murzim:/tmp> /space/rguenther/install/gcc-7.1/bin/gcc -c t.c -Os
-ffunction-sections -m32 -Wa,-32; size t.o
text data bss dec hex filename
999 0 0 999 3e7 t.o
so there's slow creep but the most significant regressions occured from
4.5 to 4.6 with 4.7 improving significantly again, afterwards the creep
stopped at least.
i586 and not x86_64 because I lack historical 64bit compilers.
Note I had to short-circuit the asm in snake_random_pixel, I'm just using
an external function for x86.
The above is probably not too useful and also architecture specific. There
isn't anything obviously wrong happening on the GIMPLE level.