[PATCH] D47683: [PM/LoopUnswitch] Teach the new unswitch to handle nontrivial unswitching of switches.
Hal Finkel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 3 06:41:12 PDT 2018
hfinkel added a comment.
Can you please update the comment at the top of include/llvm/Transforms/Scalar/SimpleLoopUnswitch.h to define "full vs. partial" unswitching and "trivial vs. non-trivial" unswitching?
================
Comment at: llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:1798
SmallVector<BasicBlock *, 16> DeadBlocks;
- if (DeleteUnswitchedSucc) {
- DeadBlocks.push_back(UnswitchedSuccBB);
+#if 0
+ for (auto *SuccBB : UnswitchedSuccBBs) {
----------------
Dead code?
================
Comment at: llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:2016
auto *BI = dyn_cast<BranchInst>(BB->getTerminator());
// FIXME: Handle switches here!
if (!BI || !BI->isConditional() || isa<Constant>(BI->getCondition()) ||
----------------
This FIXME is now out of date (switches are handled above)?
Repository:
rL LLVM
https://reviews.llvm.org/D47683
More information about the llvm-commits
mailing list