[llvm] [LoopVectorizer] Prune VFs based on plan register pressure (PR #132190)
Sam Tebbs via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 22 07:01:44 PDT 2025
================
@@ -1020,12 +1020,15 @@ class LoopVectorizationCostModel {
/// Holds the maximum number of concurrent live intervals in the loop.
/// The key is ClassID of target-provided register class.
SmallMapVector<unsigned, unsigned, 4> MaxLocalUsers;
- };
- /// \return Returns information about the register usages of the loop for the
- /// given vectorization factors.
- SmallVector<RegisterUsage, 8>
- calculateRegisterUsage(ArrayRef<ElementCount> VFs);
+ /// Check if any of the tracked live intervals exceeds the number of
+ /// available registers for the target.
+ bool exceedsMaxNumRegs(const TargetTransformInfo &TTI) {
+ return any_of(MaxLocalUsers, [&](auto &LU) {
----------------
SamTebbs33 wrote:
Done.
https://github.com/llvm/llvm-project/pull/132190
More information about the llvm-commits
mailing list