[llvm] 8a7a7b5 - [VPlan] Remove unneeded code connecting blocks in VPBB:splitAt (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 8 13:52:46 PST 2024


Author: Florian Hahn
Date: 2024-11-08T21:52:18Z
New Revision: 8a7a7b5ffc690bd012cf090d31d47ec938248ba3

URL: https://github.com/llvm/llvm-project/commit/8a7a7b5ffc690bd012cf090d31d47ec938248ba3
DIFF: https://github.com/llvm/llvm-project/commit/8a7a7b5ffc690bd012cf090d31d47ec938248ba3.diff

LOG: [VPlan] Remove unneeded code connecting blocks in VPBB:splitAt (NFC).

insertBlockAfter already takes care of transferring successors. Remove
unneeded code to transfer them manually.

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 00ba2f49017899..08db0d51ef3abb 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -552,18 +552,10 @@ VPBasicBlock *VPBasicBlock::splitAt(iterator SplitAt) {
          "can only split at a position in the same block");
 
   SmallVector<VPBlockBase *, 2> Succs(successors());
-  // First, disconnect the current block from its successors.
-  for (VPBlockBase *Succ : Succs)
-    VPBlockUtils::disconnectBlocks(this, Succ);
-
   // Create new empty block after the block to split.
   auto *SplitBlock = new VPBasicBlock(getName() + ".split");
   VPBlockUtils::insertBlockAfter(SplitBlock, this);
 
-  // Add successors for block to split to new block.
-  for (VPBlockBase *Succ : Succs)
-    VPBlockUtils::connectBlocks(SplitBlock, Succ);
-
   // Finally, move the recipes starting at SplitAt to new block.
   for (VPRecipeBase &ToMove :
        make_early_inc_range(make_range(SplitAt, this->end())))


        


More information about the llvm-commits mailing list