[Ffmpeg-devel] Getting rid of inlining failure warnings

Rich Felker dalias
Thu Nov 9 17:41:53 CET 2006


On Thu, Nov 09, 2006 at 03:41:13PM +0100, Michael Niedermayer wrote:
> 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)

It's not ridiculous. Counting instructions requires actually
assembling the block (think of horrible things like gas macros...)
which isn't done until after compiling. gcc could however use the
number of newlines in the string as a crude heuristic..

> 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

Yes, I fear it will, because the calling functions will get tainted as
"unknown size"..

Rich





More information about the ffmpeg-devel mailing list