akhuang added a comment. In D136998#3906881 <https://reviews.llvm.org/D136998#3906881>, @efriedma wrote:
> Might also be worth considering if we can avoid cloning here. It should be > possible to emit the lambda body into a separate function with a calling > convention of your choice, and make both the call operator and the static > invoker call it. Thanks for reviewing! I started a patch to emit a new function with a different calling convention here https://reviews.llvm.org/D137872. It probably has some issues - I'm not sure if the argument arranging for the call actually works generally, and it has a bunch of copied code from `EmitCall` and `EmitLambdaForwardingCall`. But, it doesn't involve changing code in `EmitGlobalDefinition`, which seems better. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136998/new/ https://reviews.llvm.org/D136998 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits