[llvm] [VPlan] Manage created blocks directly in VPlan. (NFC) (PR #120918)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 29 11:54:09 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;
----------------
ayalz wrote:
Perhaps worth leaving behind a note that OldEntry is now dead and will be collected later? Same with other deleted deletes.
https://github.com/llvm/llvm-project/pull/120918
More information about the llvm-commits
mailing list