[cxx-abi-dev] Inlining requirements for ABI functionality

Dennis Handly dhandly at cup.hp.com
Thu Dec 8 00:42:56 UTC 2011


>From: John McCall <rjmccall at apple.com>
>It's not clear to me whether you're talking about the compiler transformation
>called "inlining" or the vague-linkage effect of C++'s "inline" keyword.

I assumed it was inlining into the thunk of the whole virtual function.
(Kind of what you mentioned in your other message below?)

>because in general you cannot inline virtual methods into their call sites.

Only if you have a switch to check the typeids of the most common cases?

>The exception is for variadic methods; if you have a thunk with a
>non-trivial covariant-return adjustment for a variadic method, there is
>no way to simply forward the variadic arguments, so you must either
>duplicate the implementation or ...
John.

With IA64 and both register and memory stacks, it is a simple matter to
shuffle down the 8 registers and leave the memory stack in place.

>From: John McCall <rjmccall at apple.com>
>but covariant-return thunks must do an actual call.

Aw, right.

>Clang just gives up and inlines in this case.
John.

Is there a lot of bloat?



More information about the cxx-abi-dev mailing list