[PATCH] D122375: [CoroSplit] Handle argument being the frame pointer

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 02:35:10 PDT 2022


nikic created this revision.
nikic added reviewers: ChuanqiXu, opaque-pointers.
Herald added a subscriber: hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

If the frame pointer is an argument of the original pointer (which happens with opaque pointers), then we currently first replace the argument with undef, which will prevent later replacement of the old frame pointer with the new one.

Fix this by replacing arguments with some dummy instructions first, and then replacing those with undef later. This gives us a chance to replace the frame pointer before it becomes undef.

This is a big ugly, but I couldn't think of a better solution.

Fixes https://github.com/llvm/llvm-project/issues/54523.


https://reviews.llvm.org/D122375

Files:
  llvm/lib/Transforms/Coroutines/CoroSplit.cpp
  llvm/test/Transforms/Coroutines/coro-retcon-alloca-opaque-ptr.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122375.417856.patch
Type: text/x-patch
Size: 5521 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220324/5f3a2ec2/attachment.bin>


More information about the llvm-commits mailing list