[PATCH] D77035: [Coroutines] Simplify implementation using removePredecessor
JunMa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 18:27:46 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9c6f32a0ffd6: [Coroutines] Simplify implementation using removePredecessor (authored by junparser).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77035/new/
https://reviews.llvm.org/D77035
Files:
llvm/lib/Transforms/Coroutines/CoroSplit.cpp
Index: llvm/lib/Transforms/Coroutines/CoroSplit.cpp
===================================================================
--- llvm/lib/Transforms/Coroutines/CoroSplit.cpp
+++ llvm/lib/Transforms/Coroutines/CoroSplit.cpp
@@ -941,11 +941,7 @@
// If InitialInst is an unconditional branch,
// remove PHI values that come from basic block of InitialInst
if (UnconditionalSucc)
- for (PHINode &PN : UnconditionalSucc->phis()) {
- int idx = PN.getBasicBlockIndex(InitialInst->getParent());
- if (idx != -1)
- PN.removeIncomingValue(idx);
- }
+ UnconditionalSucc->removePredecessor(InitialInst->getParent(), true);
ReplaceInstWithInst(InitialInst, I->clone());
}
return true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77035.254669.patch
Type: text/x-patch
Size: 779 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200403/c39443b3/attachment.bin>
More information about the llvm-commits
mailing list