Bug#490644: gcc: -finline-small-functions is overzealous
Package: gcc
Version: 4:4.3.1-2
Severity: normal
According to info gcc -finline-small-functions should not
increase the generated code size:
`-finline-small-functions'
Integrate functions into their callers when their body is smaller
than expected function call code (so overall size of program gets
smaller). The compiler heuristically decides which functions are
simple enough to be worth integrating in this way.
Enabled at level `-O2'.
However, it seems that this option increases the code size more
often than not. For example, compiling dash with this option
increases its size by nearly 10%.
Here is a case in point:
$ gcc -c -O2 a.c
$ size a.o
text data bss dec hex filename
1090 0 8 1098 44a a.o
$ gcc -fno-inline-small-functions -c -O2 a.c
$ size a.o
text data bss dec hex filename
1067 0 8 1075 433 a.o
$
I would like to see this option disabled by default so that
we don't all end up with an inflated system that doesn't run
any faster.
-- System Information
Debian Release: lenny/sid
Kernel Version: Linux gorgoroth 2.6.26-rc8 #2 SMP PREEMPT Wed Jun 25 21:45:17 CST 2008 i686 GNU/Linux
Versions of the packages gcc depends on:
ii cpp 4.3.1-2 The GNU C preprocessor (cpp)
ii gcc-4.3 4.3.1-6 The GNU C compiler
Reply to: