[PATCH] D119266: [SimplifyCFG] Do not merge landingpads for invokes with deopt state.
Denis Antrushin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 8 11:16:53 PST 2022
dantrushin marked an inline comment as done.
dantrushin added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6659
+ // for such invokes.
+ BasicBlock *Pred = *pred_begin(BB);
+ if (auto *Invoke = dyn_cast<InvokeInst>(Pred->getTerminator()))
----------------
lebedev.ri wrote:
> Why is only the first predecessor checked?
Mainly because I anticipated this question.
If I'd checked all predecessor, I'd been asked why I check all of them.
Initially we start with unique landingpads, so it has single predecessor. If we do not merge them, then it will stay that way.
================
Comment at: llvm/lib/Transforms/Utils/SimplifyCFG.cpp:6660
+ BasicBlock *Pred = *pred_begin(BB);
+ if (auto *Invoke = dyn_cast<InvokeInst>(Pred->getTerminator()))
+ if (Invoke->getOperandBundle(LLVMContext::OB_deopt))
----------------
lebedev.ri wrote:
> Can `landingpad` has any other predecessor than an `invoke`?
For the problem I'm interested in, no
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119266/new/
https://reviews.llvm.org/D119266
More information about the llvm-commits
mailing list