[llvm] [DA] Add batch delinearization support for improved precision (PR #170519)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 3 09:50:31 PST 2025
================
@@ -388,6 +396,24 @@ class DependenceInfo {
unsigned char DirSet;
};
+ /// DelinearizationCache - Cache for batch delinearization results.
+ /// When analyzing multiple memory accesses to the same base pointer,
+ /// caching allows us to compute array dimensions once using all accesses,
+ /// leading to better precision (similar to Polly's approach).
+ struct DelinearizationCache {
+ /// Map from base pointer to computed array dimension sizes.
+ DenseMap<const SCEVUnknown *, SmallVector<const SCEV *, 4>> ArraySizes;
+ /// Map from instruction to pre-computed subscripts.
+ DenseMap<const Instruction *, SmallVector<const SCEV *, 4>> Subscripts;
+ /// Element size for the array (used for validation).
+ DenseMap<const SCEVUnknown *, const SCEV *> ElementSizes;
----------------
alexey-bataev wrote:
Use SmallDenseMap, it improves compile time
https://github.com/llvm/llvm-project/pull/170519
More information about the llvm-commits
mailing list