[llvm] 8a4077f - [LV] Pass LoopHeaderBB directly to updateDominatorTree. (NFC)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 30 05:11:35 PDT 2022
Author: Florian Hahn
Date: 2022-03-30T13:11:20+01:00
New Revision: 8a4077fac05407fd09d5d8f50347045d279bdac8
URL: https://github.com/llvm/llvm-project/commit/8a4077fac05407fd09d5d8f50347045d279bdac8
DIFF: https://github.com/llvm/llvm-project/commit/8a4077fac05407fd09d5d8f50347045d279bdac8.diff
LOG: [LV] Pass LoopHeaderBB directly to updateDominatorTree. (NFC)
At the call site, we already know what the vector header block is. Pass
it directly.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VPlan.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VPlan.cpp b/llvm/lib/Transforms/Vectorize/VPlan.cpp
index c5bd434b209c1..f7038e41bac26 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -1031,7 +1031,7 @@ void VPlan::execute(VPTransformState *State) {
// We do not attempt to preserve DT for outer loop vectorization currently.
if (!EnableVPlanNativePath)
- updateDominatorTree(State->DT, VectorPreHeaderBB, VectorLatchBB,
+ updateDominatorTree(State->DT, VectorHeaderBB, VectorLatchBB,
L->getExitBlock());
}
@@ -1071,11 +1071,9 @@ LLVM_DUMP_METHOD
void VPlan::dump() const { print(dbgs()); }
#endif
-void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopPreHeaderBB,
+void VPlan::updateDominatorTree(DominatorTree *DT, BasicBlock *LoopHeaderBB,
BasicBlock *LoopLatchBB,
BasicBlock *LoopExitBB) {
- BasicBlock *LoopHeaderBB = LoopPreHeaderBB->getSingleSuccessor();
- assert(LoopHeaderBB && "Loop preheader does not have a single successor.");
// The vector body may be more than a single basic-block by this point.
// Update the dominator tree information inside the vector body by propagating
// it from header to latch, expecting only triangular control-flow, if any.
More information about the llvm-commits
mailing list