[PATCH] D136998: Try to implement lambdas with inalloca parameters by inlining the call operator function.

Amy Huang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 11 16:30:13 PST 2022


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



More information about the cfe-commits mailing list