mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-19 13:26:45 +00:00
[NFC][LoopVectorize] Rename variable in replaceVPBBWithIRVPBB (#108543)
I've renamed the variable in replaceVPBBWithIRVPBB from IRMiddleVPBB -> IRVPBB, since the function is used for more than just replacing the middle VP block.
This commit is contained in:
parent
17a3bdb529
commit
b84c42944a
@ -981,16 +981,16 @@ void VPlan::prepareToExecute(Value *TripCountV, Value *VectorTripCountV,
|
||||
/// have a single predecessor, which is rewired to the new VPIRBasicBlock. All
|
||||
/// successors of VPBB, if any, are rewired to the new VPIRBasicBlock.
|
||||
static void replaceVPBBWithIRVPBB(VPBasicBlock *VPBB, BasicBlock *IRBB) {
|
||||
VPIRBasicBlock *IRMiddleVPBB = createVPIRBasicBlockFor(IRBB);
|
||||
VPIRBasicBlock *IRVPBB = createVPIRBasicBlockFor(IRBB);
|
||||
for (auto &R : make_early_inc_range(*VPBB)) {
|
||||
assert(!R.isPhi() && "Tried to move phi recipe to end of block");
|
||||
R.moveBefore(*IRMiddleVPBB, IRMiddleVPBB->end());
|
||||
R.moveBefore(*IRVPBB, IRVPBB->end());
|
||||
}
|
||||
VPBlockBase *PredVPBB = VPBB->getSinglePredecessor();
|
||||
VPBlockUtils::disconnectBlocks(PredVPBB, VPBB);
|
||||
VPBlockUtils::connectBlocks(PredVPBB, IRMiddleVPBB);
|
||||
VPBlockUtils::connectBlocks(PredVPBB, IRVPBB);
|
||||
for (auto *Succ : to_vector(VPBB->getSuccessors())) {
|
||||
VPBlockUtils::connectBlocks(IRMiddleVPBB, Succ);
|
||||
VPBlockUtils::connectBlocks(IRVPBB, Succ);
|
||||
VPBlockUtils::disconnectBlocks(VPBB, Succ);
|
||||
}
|
||||
delete VPBB;
|
||||
|
Loading…
x
Reference in New Issue
Block a user