• Bug#265673: Compiles with idiotic "-finline-limit-30000" option

    From Falk Hueffner@1:229/2 to All on Sat Aug 14 14:00:10 2004
    From: [email protected]

    Package: vlc
    Version: 0.7.2.final-10
    Severity: normal

    vlc compiles with -O0, but -finline-limit-30000. 30000 is an insanely
    high value and leads to bloated and slow binaries.

    Use -O2 instead as policy mandates.

    -- System Information:
    Debian Release: 3.1
    APT prefers unstable
    APT policy: (500, 'unstable')
    Architecture: alpha
    Kernel: Linux 2.6.8-rc3
    Locale: LANG=C, LC_CTYPE=de_DE@euro


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Sam Hocevar@1:229/2 to Falk Hueffner on Sat Aug 14 17:00:12 2004
    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,
    and if a function is defined as inline, well it should be inlined. Do
    you have a specific function in mind that causes bloatness?

    Use -O2 instead

    The VLC build process uses -O3, not -O0. Do you have a build log
    where vlc ends up building with -O0? This flag appears nowhere in the configuration script.

    as policy mandates.

    Uh? Check the policy again:

    | Certain binaries (such as computationally-intensive programs) will
    | function better with certain flags (`-O3', for example); feel free
    | to use them.

    Also -O3 should be quite efficient on Alpha thanks to
    -frename-registers.

    --
    Sam.


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Falk Hueffner@1:229/2 to Sam Hocevar on Sat Aug 14 18:10:14 2004
    From: [email protected]

    Sam Hocevar <[email protected]> writes:

    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.

    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.

    Use -O2 instead

    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.

    --
    Falk


    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Sam Hocevar@1:229/2 to Falk Hueffner on Sat Aug 14 22:00:09 2004
    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)