Skip to content

Commit 1f34e4b

Browse files
authored
[VPlan] Set predecessor of DispatchVPBB early (NFC). (#195480)
This allows finding the containing plan earlier, which helps when trying to print DispatchVPBB in a debugger.
1 parent ff94721 commit 1f34e4b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4162,6 +4162,7 @@ void VPlanTransforms::handleUncountableEarlyExits(VPlan &Plan,
41624162
VPBasicBlock *DispatchVPBB =
41634163
Exits.size() == 1 ? VectorEarlyExitVPBBs[0]
41644164
: Plan.createVPBasicBlock("vector.early.exit.check");
4165+
DispatchVPBB->setPredecessors({LatchVPBB});
41654166
VPBuilder DispatchBuilder(DispatchVPBB, DispatchVPBB->begin());
41664167
VPValue *FirstActiveLane = DispatchBuilder.createFirstActiveLane(
41674168
{Combined}, DebugLoc::getUnknown(), "first.active.lane");
@@ -4283,7 +4284,6 @@ void VPlanTransforms::handleUncountableEarlyExits(VPlan &Plan,
42834284
{IsAnyExitTaken, IsLatchExitTaken}, LatchDL);
42844285
LatchVPBB->clearSuccessors();
42854286
LatchVPBB->setSuccessors({DispatchVPBB, MiddleVPBB, HeaderVPBB});
4286-
DispatchVPBB->setPredecessors({LatchVPBB});
42874287
}
42884288

42894289
/// This function tries convert extended in-loop reductions to

0 commit comments

Comments
 (0)