[PATCH] D31846: [coroutines] Handle spills before catchswitch
David Majnemer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 17:18:03 PDT 2017
majnemer added inline comments.
================
Comment at: lib/Transforms/Coroutines/CoroFrame.cpp:360-368
+ BasicBlock *CurrentBlock = CatchSwitch->getParent();
+ BasicBlock *NewBlock = CurrentBlock->splitBasicBlock(CatchSwitch);
+ CurrentBlock->getTerminator()->eraseFromParent();
+
+ auto *CleanupPad =
+ CleanupPadInst::Create(CatchSwitch->getParentPad(), {}, "", CurrentBlock);
+ auto *CleanupRet =
----------------
What if the catchswitch had a phi on it? You are adding a predecessor which would mean it needs new entries.
https://reviews.llvm.org/D31846
More information about the llvm-commits
mailing list