[llvm] [VPlan] Manage created blocks directly in VPlan. (NFC) (PR #120918)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 29 13:12:34 PST 2024


================
@@ -2477,7 +2477,7 @@ static void introduceCheckBlockInVPlan(VPlan &Plan, BasicBlock *CheckIRBB) {
     assert(PreVectorPH->getNumSuccessors() == 2 && "Expected 2 successors");
     assert(PreVectorPH->getSuccessors()[0] == ScalarPH &&
            "Unexpected successor");
-    VPIRBasicBlock *CheckVPIRBB = VPIRBasicBlock::fromBasicBlock(CheckIRBB);
+    VPIRBasicBlock *CheckVPIRBB = Plan.createVPIRBasicBlock(CheckIRBB);
----------------
fhahn wrote:

Yep, but in this case it is directly tied to VPlan so we can track liveness conveniently; we could track liveness separately from VPlan, but then we would have 2 data structures to keep in sync and to delete together.

https://github.com/llvm/llvm-project/pull/120918


More information about the llvm-commits mailing list