[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:30 PST 2024


================
@@ -8189,11 +8189,10 @@ EpilogueVectorizerEpilogueLoop::emitMinimumVectorEpilogueIterCountCheck(
 
   // A new entry block has been created for the epilogue VPlan. Hook it in, as
   // otherwise we would try to modify the entry to the main vector loop.
-  VPIRBasicBlock *NewEntry = VPIRBasicBlock::fromBasicBlock(Insert);
+  VPIRBasicBlock *NewEntry = Plan.createVPIRBasicBlock(Insert);
   VPBasicBlock *OldEntry = Plan.getEntry();
   VPBlockUtils::reassociateBlocks(OldEntry, NewEntry);
   Plan.setEntry(NewEntry);
-  delete OldEntry;
----------------
fhahn wrote:

Added, thanks!

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


More information about the llvm-commits mailing list