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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 30 02:51:20 PST 2024


================
@@ -467,15 +467,18 @@ TEST_F(VPBasicBlockTest, TraversingIteratorTest) {
     //  VPBB2
     //
     VPlan &Plan = getPlan();
-    VPBasicBlock *R1BB1 = new VPBasicBlock("R1BB1");
-    VPBasicBlock *R1BB2 = new VPBasicBlock("R1BB2");
-    VPBasicBlock *R1BB3 = new VPBasicBlock("R1BB3");
-    VPRegionBlock *R1 = new VPRegionBlock(R1BB1, R1BB3, "R1");
-
-    VPBasicBlock *R2BB1 = new VPBasicBlock("R2BB1");
-    VPBasicBlock *R2BB2 = new VPBasicBlock("R2BB2");
-    VPBasicBlock *R2BB3 = new VPBasicBlock("R2BB3");
-    VPRegionBlock *R2 = new VPRegionBlock(R2BB1, R2BB3, "R2");
+    VPBasicBlock *R1BB1 = Plan.createVPBasicBlock("R1BB1");
+    VPBasicBlock *R1BB2 = Plan.createVPBasicBlock("R1BB2");
+    VPBasicBlock *R1BB3 = Plan.createVPBasicBlock("R1BB3");
+    VPRegionBlock *R1 = Plan.createVPRegionBlock(R1BB1, R1BB3, "R1");
+
+    VPBasicBlock *R2BB1 = Plan.createVPBasicBlock(""
+                                                  "R2BB1");
+    VPBasicBlock *R2BB2 = Plan.createVPBasicBlock(""
+                                                  "R2BB2");
+    VPBasicBlock *R2BB3 = Plan.createVPBasicBlock(""
+                                                  "R2BB3");
----------------
fhahn wrote:

Fixed, thanks

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


More information about the llvm-commits mailing list