From:
[email protected]
On Sat, Aug 14, 2004, Falk Hueffner wrote:
vlc compiles with -O0, but -finline-limit-30000. 30000 is an insanely
high value and leads to bloated and slow binaries.
finline-limit only acts on functions that are explicitely inlined,
No, it doesn't, at least not with -finline-function, which is
activated by -O3 and might become default in the future.
Ah, I tested it and you are right. The gcc manual page actually
states this limit is "for functions that are explicitly marked as
inline". This behaviour was respected up to gcc-3.0; it seems gcc-3.2
broke it. I will fix the upstream VLC makefile to not assume this with
newest gcc versions.
and if a function is defined as inline, well it should be inlined.
If that is what you want, use #define inline
__attribute__((always_inline)). I don't see any reason for this,
though; the compiler can judge better than you whether a function
should be inlined. Inlining is not always faster.
I know inlining is not always faster; but basing the decision on
the size of the function is hardly � judging better �. I have enough
experience with inlining and benchmarking effects on cache to know a bit
better than gcc when a big function is worth inlining.
The VLC build process uses -O3, not -O0. Do you have a build log
where vlc ends up building with -O0?
http://buildd.debian.org/fetch.php?&pkg=vlc&ver=0.7.2.final-10&arch=alpha&stamp=1092398539&file=log&as=raw
[...]
if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -DSYS_LINUX -I../../include `top_builddir="../.." ../../vlc-config --cflags builtin theora` -Wsign-compare -Wall -finline-limit-30000 -pipe -MT libtheora_a-theora.o -MD -MP -MF ".deps/libtheora_a-theora.Tpo" \
-c -o libtheora_a-theora.o `test -f 'theora.c' || echo './'`theora.c; \ [...]
This flag appears nowhere in the configuration script.
No -O flag is given, so it defaults to -O0.
Well they don't appear, but -O3 gets expanded from the
`top_builddir="../.." ../../vlc-config --cflags builtin theora` part.
Judging from the output of ./configure, -O3 was successfully tested and
hence activated.
--
Sam.
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)