[llvm] [VPlan] Hook IR blocks into VPlan during skeleton creation (NFC) (PR #114292)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 15:43:56 PST 2024
================
@@ -1181,6 +1181,20 @@ std::string VPlan::getName() const {
return Out;
}
+VPRegionBlock *VPlan::getVectorLoopRegion() {
+ for (VPBlockBase *B : vp_depth_first_shallow(getEntry()))
+ if (auto *R = dyn_cast<VPRegionBlock>(B))
+ return R;
+ return nullptr;
----------------
ayalz wrote:
Better cache the result? Can be done as follow-up.
https://github.com/llvm/llvm-project/pull/114292
More information about the llvm-commits
mailing list