[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:32 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())
----------------
ayalz wrote:

```suggestion
  // If VPBB is in a region R, VPBB is a loop header if R is a loop region with VPBB as its entry, i.e., free of predecessors.
  if (auto *R = VPBB->getParent())
```


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


More information about the llvm-commits mailing list