[LV] Pass LoopHeaderBB directly to updateDominatorTree. (NFC)

At the call site, we already know what the vector header block is. Pass
it directly.
This commit is contained in:
Florian Hahn 2022-03-30 13:11:20 +01:00
parent 76174459ac
commit 8a4077fac0
No known key found for this signature in database
GPG Key ID: EEF712BB5E80EBBA
1 changed files with 2 additions and 4 deletions

View File

@ -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.