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


================
@@ -822,32 +834,27 @@ void VPRegionBlock::print(raw_ostream &O, const Twine &Indent,
 #endif
 
 VPlan::VPlan(Loop *L) {
-  setEntry(VPIRBasicBlock::fromBasicBlock(L->getLoopPreheader()));
-  ScalarHeader = VPIRBasicBlock::fromBasicBlock(L->getHeader());
+  setEntry(createVPIRBasicBlock(L->getLoopPreheader()));
+  ScalarHeader = createVPIRBasicBlock(L->getHeader());
 }
 
 VPlan::~VPlan() {
   if (Entry) {
----------------
ayalz wrote:

Should this check if (Entry) be dropped now that CreatedBlocks are traversed (and probably need to be regardless of Entry)?

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


More information about the llvm-commits mailing list