[PATCH] D47683: [PM/LoopUnswitch] Teach the new unswitch to handle nontrivial unswitching of switches.
Alina Sbirlea via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 5 15:47:47 PDT 2018
asbirlea added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:731
BasicBlock *UnswitchedSuccBB, BasicBlock *ContinueSuccBB,
- const SmallPtrSetImpl<BasicBlock *> &SkippedLoopAndExitBlocks,
+ const SmallDenseMap<BasicBlock *, BasicBlock *, 16> &DominatingSucc,
ValueToValueMapTy &VMap,
----------------
Could you update the above comment to clarify who DominatingSucc is?
e.g. "It skips loop and exit blocks if their dominating successor (`DominatingSucc`) is not the block being unswitched." ?
================
Comment at: llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp:1747
+ for (BasicBlock *SuccBB : UnswitchedSuccBBs) {
+ // Remove the parent as a predecessor of the
+ // unswitched successor.
----------------
clang-format?
Repository:
rL LLVM
https://reviews.llvm.org/D47683
More information about the llvm-commits
mailing list