[PATCH] D45116: Don't inline branch funnels

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 3 10:42:21 PDT 2018


rnk added a comment.

Thanks, I looked, and now I understand better what's going on. These are thunks, and we do in fact want the argument forwarding behavior of a variadic musttail call.

I guess one thing that is weird about `@llvm.icall.branch.funnel` is that it doesn't quite obey the musttail verifier rules, which are supposed to require that the prototype of the caller matches the prototype of the callee. This ensures that we never have to adjust the location of the return address on the stack when emitting the tail call. Maybe I forgot to check intrinsics, or the arguments that are part of the variadic pack in the verifier.

Have you considered passing these extra parameters as an operand bundle, or do those not support variable numbers of operands?

I think I actually prefer the original `noinline` marker patch to changing the inliner. @pcc, what do you think?


Repository:
  rL LLVM

https://reviews.llvm.org/D45116





More information about the llvm-commits mailing list