[Ffmpeg-devel] Getting rid of inlining failure warnings

Michael Niedermayer michaelni
Thu Nov 9 15:41:13 CET 2006


Hi

On Thu, Nov 09, 2006 at 02:59:15PM +0100, Panagiotis Issaris wrote:
> Hi,
> 
> The attached patch gets rid of inlining failure warnings. It is _not_
> meant for inclusion in SVN as it:
> 1. Removes the inline specifier inconsistently, meaning that I f.e.
> removed the inline keyword for some versions of a function and not for
> the other versions of it (e.g. #ifdef ...X64 or #ifdef ...X32).
> 2. Removes it from even really small functions.
> 3. Generates new warnings.
> 
> Total number of warnings before the patch: 1141
> Total number of "inlining failed in call to ..." warnings before the
> patch: 353
> After this patch: 0
> The new total number of warnings after this patch is not 1141-353, but
> 1077, as new warnings popped up as the inline specifier was removed. In
> fact, there were a lot of "???emms??? defined but not used", with "emms"
> substituted by the function name I removed the inline specifier from.
> 
> 
> There are some inline's which are failing which I do not understand:
> * read_time: This one fails, although it is just a few lines long,
> actually just using the RDTSC asm instruction. It actually shows:
> "large-function-growth limit reached", so I'm guessing that the
> encompassing function is inlining a lot of other functions causing it to
> grow to much, and because of this growth, inlining even this small
> function fails?
> * emms_c: Exactly the same case for this one, I guess.

rdtsc and emms should be smaller if inlined then if called, if you are brave
and after verifying that the instructions are smaller or equal then a call
then submit a bugreport to the gcc devels
but they will probably close it with some comment like gcc cant count
instructions in an asm (probably claiming that it is fundamentally impossible
to do or some other similar ridiculous statement)

in the meanwhile rdtsc & emms could be marked always_inline but that could
cause other random functions to fail to be inlined (this should be checked
a diff of "nm foobar.o" before and afterwards should give a definite awnser
tough

also functions which are called just from one spot or just from one spot 
per filetype should be marked as always_inline
...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list