Re: [RFC PATCH 14/21] treewide: static_call: Pass call arguments to the macro

From: Sami Tolvanen
Date: Fri Apr 29 2022 - 20:51:29 EST


On Fri, Apr 29, 2022 at 4:21 PM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> Can you explain why this is needed? I don't think there are any indirect
> calls to get confused about. That is, if you have STATIC_CALL_INLINE
> then the compiler should be emitting direct calls to the trampoline.

Clang emits an indirect call for ({ &f; })(), which is optimized into
a direct call when possible. Come to think of it, the recent
InstCombine change to the compiler patch should solve this issue. Let
me double check, I'd be more than happy to drop these two patches.

Sami