[PATCH] D101980: [RFC] [Coroutines] Put the contents of byval argument to the frame

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 10 00:15:02 PDT 2021


ychen added a comment.

In D101980#2743665 <https://reviews.llvm.org/D101980#2743665>, @rjmccall wrote:

> How is the situation with `byval` different from the situation with indirect arguments?  It sounds like we generally need to perform this extra copy into the coroutine frame once it's allocated, and yes, that's something we need to emit in the frontend because it might be non-trivial.
>
> Or is the problem that LLVM might be helpfully eliminating the copy when the source is a `byval` parameter?  But that's also something it could be doing with indirect arguments, so again, treating `byval` specially seems suspect.

I suspect inalloca might have the similar problem. In both cases, the arguments have the hidden copy on the stack which might have a shorter lifetime than coroutines.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101980/new/

https://reviews.llvm.org/D101980



More information about the llvm-commits mailing list