[llvm] [LoopCacheAnalysis] Remove tryDelinearizeFixedSize (NFCI) (PR #177552)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 23 01:27:09 PST 2026
github-actions[bot] wrote:
<!--LLVM IDS CHECK COMMENT-->
:warning: LLVM ABI annotation checker, ids-check found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git diff origin/main HEAD -- 'llvm/include/llvm/**/*.h' 'llvm/include/llvm-c/**/*.h' 'llvm/include/llvm/Demangle/**/*.h'
Then run idt on the changed files with appropriate --export-macro and --include-header flags.
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from ids-check here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/Analysis/LoopCacheAnalysis.h b/llvm/include/llvm/Analysis/LoopCacheAnalysis.h
index 5184944e3..ef5b798a7 100644
--- a/llvm/include/llvm/Analysis/LoopCacheAnalysis.h
+++ b/llvm/include/llvm/Analysis/LoopCacheAnalysis.h
@@ -14,6 +14,7 @@
#ifndef LLVM_ANALYSIS_LOOPCACHEANALYSIS_H
#define LLVM_ANALYSIS_LOOPCACHEANALYSIS_H
+#include "llvm/Support/Compiler.h"
#include "llvm/Analysis/LoopAnalysisManager.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Support/InstructionCost.h"
@@ -51,7 +52,7 @@ class IndexedReference {
public:
/// Construct an indexed reference given a \p StoreOrLoadInst instruction.
- IndexedReference(Instruction &StoreOrLoadInst, const LoopInfo &LI,
+ LLVM_ABI IndexedReference(Instruction &StoreOrLoadInst, const LoopInfo &LI,
ScalarEvolution &SE);
bool isValid() const { return IsValid; }
@@ -74,14 +75,14 @@ public:
/// are/aren't in the same cache line of size \p CLS. Two references are in
/// the same chace line iff the distance between them in the innermost
/// dimension is less than the cache line size. Return std::nullopt if unsure.
- std::optional<bool> hasSpacialReuse(const IndexedReference &Other,
+ LLVM_ABI std::optional<bool> hasSpacialReuse(const IndexedReference &Other,
unsigned CLS, AAResults &AA) const;
/// Return true if the current object and the indexed reference \p Other
/// have distance smaller than \p MaxDistance in the dimension associated with
/// the given loop \p L. Return false if the distance is not smaller than \p
/// MaxDistance and std::nullopt if unsure.
- std::optional<bool> hasTemporalReuse(const IndexedReference &Other,
+ LLVM_ABI std::optional<bool> hasTemporalReuse(const IndexedReference &Other,
unsigned MaxDistance, const Loop &L,
DependenceInfo &DI, AAResults &AA) const;
@@ -94,7 +95,7 @@ public:
/// + the coefficient of this loop's index variable used in all other
/// subscripts is zero
/// - or otherwise equal to 'TripCount'.
- CacheCostTy computeRefCost(const Loop &L, unsigned CLS) const;
+ LLVM_ABI CacheCostTy computeRefCost(const Loop &L, unsigned CLS) const;
private:
/// Attempt to delinearize the indexed reference.
@@ -193,7 +194,7 @@ public:
/// The optional parameter \p TRT can be used to specify the max. distance
/// between array elements accessed in a loop so that the elements are
/// classified to have temporal reuse.
- CacheCost(const LoopVectorTy &Loops, const LoopInfo &LI, ScalarEvolution &SE,
+ LLVM_ABI CacheCost(const LoopVectorTy &Loops, const LoopInfo &LI, ScalarEvolution &SE,
TargetTransformInfo &TTI, AAResults &AA, DependenceInfo &DI,
std::optional<unsigned> TRT = std::nullopt);
@@ -201,7 +202,7 @@ public:
/// The optional parameter \p TRT can be used to specify the max. distance
/// between array elements accessed in a loop so that the elements are
/// classified to have temporal reuse.
- static std::unique_ptr<CacheCost>
+ LLVM_ABI static std::unique_ptr<CacheCost>
getCacheCost(Loop &Root, LoopStandardAnalysisResults &AR, DependenceInfo &DI,
std::optional<unsigned> TRT = std::nullopt);
@@ -274,8 +275,8 @@ private:
DependenceInfo &DI;
};
-raw_ostream &operator<<(raw_ostream &OS, const IndexedReference &R);
-raw_ostream &operator<<(raw_ostream &OS, const CacheCost &CC);
+LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, const IndexedReference &R);
+LLVM_ABI raw_ostream &operator<<(raw_ostream &OS, const CacheCost &CC);
/// Printer pass for the \c CacheCost results.
class LoopCachePrinterPass : public PassInfoMixin<LoopCachePrinterPass> {
@@ -284,7 +285,7 @@ class LoopCachePrinterPass : public PassInfoMixin<LoopCachePrinterPass> {
public:
explicit LoopCachePrinterPass(raw_ostream &OS) : OS(OS) {}
- PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM,
+ LLVM_ABI PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM,
LoopStandardAnalysisResults &AR, LPMUpdater &U);
static bool isRequired() { return true; }
``````````
</details>
https://github.com/llvm/llvm-project/pull/177552
More information about the llvm-commits
mailing list