[llvm] [LV] Remove unused MinProfitableTripCount field from ILV (NFC) (PR #205666)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 25 11:52:41 PDT 2026
https://github.com/fhahn updated https://github.com/llvm/llvm-project/pull/205666
>From 4acefbab36b9ff735e9f268b608ed023bbf49c0e Mon Sep 17 00:00:00 2001
From: Florian Hahn <flo at fhahn.com>
Date: Mon, 22 Jun 2026 08:40:18 +0100
Subject: [PATCH] [LV] Remove unused MinProfitableTripCount field from ILV
(NFC)
The MinProfitableTripCount is never read. Remove it.
---
.../Transforms/Vectorize/LoopVectorize.cpp | 23 +++++++++----------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 545fcba65d228..10d410111bdb3 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -644,15 +644,17 @@ struct EpilogueLoopVectorizationInfo {
/// them in succession from the loop vectorizer planner.
class InnerLoopAndEpilogueVectorizer : public InnerLoopVectorizer {
public:
- InnerLoopAndEpilogueVectorizer(
- Loop *OrigLoop, PredicatedScalarEvolution &PSE, LoopInfo *LI,
- DominatorTree *DT, const TargetTransformInfo *TTI, AssumptionCache *AC,
- EpilogueLoopVectorizationInfo &EPI, LoopVectorizationCostModel *CM,
- GeneratedRTChecks &Checks, VPlan &Plan, ElementCount VecWidth,
- ElementCount MinProfitableTripCount, unsigned UnrollFactor)
+ InnerLoopAndEpilogueVectorizer(Loop *OrigLoop, PredicatedScalarEvolution &PSE,
+ LoopInfo *LI, DominatorTree *DT,
+ const TargetTransformInfo *TTI,
+ AssumptionCache *AC,
+ EpilogueLoopVectorizationInfo &EPI,
+ LoopVectorizationCostModel *CM,
+ GeneratedRTChecks &Checks, VPlan &Plan,
+ ElementCount VecWidth, unsigned UnrollFactor)
: InnerLoopVectorizer(OrigLoop, PSE, LI, DT, TTI, AC, VecWidth,
UnrollFactor, CM, Checks, Plan),
- EPI(EPI), MinProfitableTripCount(MinProfitableTripCount) {}
+ EPI(EPI) {}
/// Holds and updates state information required to vectorize the main loop
/// and its epilogue in two separate passes. This setup helps us avoid
@@ -661,9 +663,6 @@ class InnerLoopAndEpilogueVectorizer : public InnerLoopVectorizer {
/// iteration count of the loop is so small that the main vector loop is
/// completely skipped.
EpilogueLoopVectorizationInfo &EPI;
-
-protected:
- ElementCount MinProfitableTripCount;
};
/// A specialized derived class of inner loop vectorizer that performs
@@ -680,7 +679,7 @@ class EpilogueVectorizerMainLoop : public InnerLoopAndEpilogueVectorizer {
GeneratedRTChecks &Check, VPlan &Plan)
: InnerLoopAndEpilogueVectorizer(OrigLoop, PSE, LI, DT, TTI, AC, EPI, CM,
Check, Plan, EPI.MainLoopVF,
- EPI.MainLoopVF, EPI.MainLoopUF) {}
+ EPI.MainLoopUF) {}
protected:
void printDebugTracesAtStart() override;
@@ -701,7 +700,7 @@ class EpilogueVectorizerEpilogueLoop : public InnerLoopAndEpilogueVectorizer {
GeneratedRTChecks &Checks, VPlan &Plan)
: InnerLoopAndEpilogueVectorizer(OrigLoop, PSE, LI, DT, TTI, AC, EPI, CM,
Checks, Plan, EPI.EpilogueVF,
- EPI.EpilogueVF, EPI.EpilogueUF) {}
+ EPI.EpilogueUF) {}
/// Implements the interface for creating a vectorized skeleton using the
/// *epilogue loop* strategy (i.e., the second pass of VPlan execution).
BasicBlock *createVectorizedLoopSkeleton() final;
More information about the llvm-commits
mailing list