[llvm] [VPlan] Replace VPRegionBlock with explicit CFG before execute (NFCI). (PR #117506)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed May 14 02:19:02 PDT 2025
================
@@ -207,6 +207,19 @@ VPBlockBase *VPBlockBase::getEnclosingBlockWithPredecessors() {
return Parent->getEnclosingBlockWithPredecessors();
}
+bool VPBlockUtils::isHeader(const VPBlockBase *VPB,
+ const VPDominatorTree &VPDT) {
+ auto *VPBB = dyn_cast<VPBasicBlock>(VPB);
+ if (!VPBB)
+ return false;
+ if (auto *R = VPBB->getParent())
+ return !R->isReplicator() && VPBB->getNumPredecessors() == 0;
+
+ assert(!VPB->getParent() && "checking blocks in regions not implemented yet");
+ return VPB->getPredecessors().size() == 2 &&
----------------
fhahn wrote:
Done thanks!
https://github.com/llvm/llvm-project/pull/117506
More information about the llvm-commits
mailing list