[llvm] [VPlan] Refactor VPlan creation, add transform introducing region (NFC). (PR #128419)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 28 14:36:24 PST 2025
================
@@ -353,29 +353,6 @@ void PlainCFGBuilder::createVPInstructionsForVPBB(VPBasicBlock *VPBB,
// Main interface to build the plain CFG.
void PlainCFGBuilder::buildPlainCFG(
DenseMap<VPBlockBase *, BasicBlock *> &VPB2IRBB) {
- // 0. Reuse the top-level region, vector-preheader and exit VPBBs from the
- // skeleton. These were created directly rather than via getOrCreateVPBB(),
- // revisit them now to update BB2VPBB. Note that header/entry and
- // latch/exiting VPBB's of top-level region have yet to be created.
- VPRegionBlock *TheRegion = Plan.getVectorLoopRegion();
- BasicBlock *ThePreheaderBB = TheLoop->getLoopPreheader();
- assert((ThePreheaderBB->getTerminator()->getNumSuccessors() == 1) &&
- "Unexpected loop preheader");
- auto *VectorPreheaderVPBB =
- cast<VPBasicBlock>(TheRegion->getSinglePredecessor());
- // ThePreheaderBB conceptually corresponds to both Plan.getPreheader() (which
- // wraps the original preheader BB) and Plan.getEntry() (which represents the
- // new vector preheader); here we're interested in setting BB2VPBB to the
- // latter.
- BB2VPBB[ThePreheaderBB] = VectorPreheaderVPBB;
- Loop2Region[LI->getLoopFor(TheLoop->getHeader())] = TheRegion;
----------------
ayalz wrote:
(btw, `LI->getLoopFor(TheLoop->getHeader())` is aka `TheLoop`?)
https://github.com/llvm/llvm-project/pull/128419
More information about the llvm-commits
mailing list