[llvm] 7fe149c - [VPlan] Replace getIRBasicBlock with IRBB in VPIRBB::execute (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 27 08:23:31 PDT 2024


Author: Florian Hahn
Date: 2024-10-27T16:22:18+01:00
New Revision: 7fe149cdf09d04fb8390b97c91bd9214c968cd3e

URL: https://github.com/llvm/llvm-project/commit/7fe149cdf09d04fb8390b97c91bd9214c968cd3e
DIFF: https://github.com/llvm/llvm-project/commit/7fe149cdf09d04fb8390b97c91bd9214c968cd3e.diff

LOG: [VPlan] Replace getIRBasicBlock with IRBB in VPIRBB::execute (NFC).

Suggested in https://github.com/llvm/llvm-project/pull/109975. This
makes the function consistent throughout.

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 44ffcb954a2842..0484543d2d0398 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlan.cpp
@@ -453,13 +453,13 @@ VPBasicBlock::createEmptyBasicBlock(VPTransformState::CFGState &CFG) {
 void VPIRBasicBlock::execute(VPTransformState *State) {
   assert(getHierarchicalSuccessors().size() <= 2 &&
          "VPIRBasicBlock can have at most two successors at the moment!");
-  State->Builder.SetInsertPoint(getIRBasicBlock()->getTerminator());
-  executeRecipes(State, getIRBasicBlock());
+  State->Builder.SetInsertPoint(IRBB->getTerminator());
+  executeRecipes(State, IRBB);
   if (getSingleSuccessor()) {
-    assert(isa<UnreachableInst>(getIRBasicBlock()->getTerminator()));
-    auto *Br = State->Builder.CreateBr(getIRBasicBlock());
+    assert(isa<UnreachableInst>(IRBB->getTerminator()));
+    auto *Br = State->Builder.CreateBr(IRBB);
     Br->setOperand(0, nullptr);
-    getIRBasicBlock()->getTerminator()->eraseFromParent();
+    IRBB->getTerminator()->eraseFromParent();
   }
 
   for (VPBlockBase *PredVPBlock : getHierarchicalPredecessors()) {


        


More information about the llvm-commits mailing list