[PATCH] D122383: [Coroutines] [Retcon] Replace CoroBegin with FramePtr after

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 00:10:26 PDT 2022


rjmccall added a comment.

Hmm.  Doing this after doing the clones means you're only actually doing the replacement in the ramp function, which I think means it'll explode in the clones if there are uses remaining.  On some level, that might be okay, because I don't think the Swift frontend ever actually uses the result of coro.begin in retcon functions except to pass it to coro.end, and retcon lowering of coro.end just ignores the argument.  On the other hand, we shouldn't leave something around that'll blow up if the code pattern ever changes.

I think you can just recognize this case (when Shape.FramePtr is an argument) and remove the mapping for that argument from VMap before cloning.


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

https://reviews.llvm.org/D122383



More information about the llvm-commits mailing list