[llvm] [LoopVectorizer] Prune VFs based on plan register pressure (PR #132190)

Sam Tebbs via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 16 02:22:57 PDT 2025


================
@@ -4527,6 +4507,11 @@ static bool willGenerateVectors(VPlan &Plan, ElementCount VF,
 }
 
 #ifndef NDEBUG
+static SmallVector<LoopVectorizationCostModel::RegisterUsage, 8>
+calculateRegisterUsage(VPlan &Plan, ArrayRef<ElementCount> VFs,
+                       const TargetTransformInfo &TTI,
+                       const SmallPtrSetImpl<const Value *> &ValuesToIgnore);
----------------
SamTebbs33 wrote:

It's used in and defined above `selectInterleaveCount` . I originally moved the function from there to above `selectVectorizationFactor` but that produced a big diff that was harder to review.

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


More information about the llvm-commits mailing list