Skip to content

Commit bcc8378

Browse files
committed
use SmallDenseMap in DelinearizationCache for better compile time
1 parent 546777f commit bcc8378

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

llvm/include/llvm/Analysis/DependenceAnalysis.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,11 +402,13 @@ class DependenceInfo {
402402
/// leading to better precision (similar to Polly's approach).
403403
struct DelinearizationCache {
404404
/// Map from base pointer to computed array dimension sizes.
405-
DenseMap<const SCEVUnknown *, SmallVector<const SCEV *, 4>> ArraySizes;
405+
SmallDenseMap<const SCEVUnknown *, SmallVector<const SCEV *, 4>, 8>
406+
ArraySizes;
406407
/// Map from instruction to pre-computed subscripts.
407-
DenseMap<const Instruction *, SmallVector<const SCEV *, 4>> Subscripts;
408+
SmallDenseMap<const Instruction *, SmallVector<const SCEV *, 4>, 16>
409+
Subscripts;
408410
/// Element size for the array (used for validation).
409-
DenseMap<const SCEVUnknown *, const SCEV *> ElementSizes;
411+
SmallDenseMap<const SCEVUnknown *, const SCEV *, 8> ElementSizes;
410412
/// Flag indicating whether the cache has been populated.
411413
bool IsPopulated = false;
412414
};

0 commit comments

Comments
 (0)