[llvm] e0b3e4c - [LAA] Remove unused functions (NFC) (#226733)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 26 15:02:49 PDT 2026
Author: Florian Hahn
Date: 2026-09-26T22:02:42Z
New Revision: e0b3e4c82911376fcb2dfcbc4a3dd3f4f5891aba
URL: https://github.com/llvm/llvm-project/commit/e0b3e4c82911376fcb2dfcbc4a3dd3f4f5891aba
DIFF: https://github.com/llvm/llvm-project/commit/e0b3e4c82911376fcb2dfcbc4a3dd3f4f5891aba.diff
LOG: [LAA] Remove unused functions (NFC) (#226733)
Remove RuntimePointerChecking::empty and LoopAccessInfo::getNumLoads /
getNumStores, which have no callers, together with the NumLoads and
NumStores counters that were only read by the latter.
Added:
Modified:
llvm/include/llvm/Analysis/LoopAccessAnalysis.h
llvm/lib/Analysis/LoopAccessAnalysis.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
index 792b8ba9cabc5..0e5f5a1e81b77 100644
--- a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
+++ b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h
@@ -598,9 +598,6 @@ class RuntimePointerChecking {
unsigned ASId, PredicatedScalarEvolution &PSE,
bool NeedsFreeze);
- /// No run-time memory checking is necessary.
- bool empty() const { return Pointers.empty(); }
-
/// Generate the checks and store it. This also performs the grouping
/// of pointers to reduce the number of memchecks necessary.
LLVM_ABI void generateChecks(MemoryDepChecker::DepCandidates &DepCands);
@@ -770,9 +767,6 @@ class LoopAccessInfo {
/// Returns true if value \p V is loop invariant.
LLVM_ABI bool isInvariant(Value *V) const;
- unsigned getNumStores() const { return NumStores; }
- unsigned getNumLoads() const { return NumLoads;}
-
/// The diagnostics report generated for the analysis. E.g. why we
/// couldn't analyze the loop.
const OptimizationRemarkAnalysis *getReport() const { return Report.get(); }
@@ -874,9 +868,6 @@ class LoopAccessInfo {
/// memory accesses could be analyzed.
bool AllowPartial;
- unsigned NumLoads = 0;
- unsigned NumStores = 0;
-
/// Cache the result of analyzeLoop.
bool CanVecMem = false;
bool HasConvergentOp = false;
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index 409d9ceb5b812..804ffe5bb2edd 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -2789,7 +2789,6 @@ bool LoopAccessInfo::analyzeLoop(AAResults *AA, const LoopInfo *LI,
HasComplexMemInst = true;
continue;
}
- NumLoads++;
Loads.push_back(Ld);
DepChecker->addAccess(Ld);
if (EnableMemAccessVersioningOfLoop)
@@ -2813,7 +2812,6 @@ bool LoopAccessInfo::analyzeLoop(AAResults *AA, const LoopInfo *LI,
HasComplexMemInst = true;
continue;
}
- NumStores++;
Stores.push_back(St);
DepChecker->addAccess(St);
if (EnableMemAccessVersioningOfLoop)
More information about the llvm-commits
mailing list