[llvm] [VPlan] Replace VPRegionBlock with explicit CFG before execute (NFCI). (PR #117506)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 13 14:38:33 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");
----------------
ayalz wrote:
Implemented above?
```suggestion
```
https://github.com/llvm/llvm-project/pull/117506
More information about the llvm-commits
mailing list