[llvm] [LAA] Be more precise on different store sizes (PR #122318)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 21 10:01:47 PDT 2025
================
@@ -2061,14 +2061,12 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
return MemoryDepChecker::Dependence::Unknown;
}
- TypeSize AStoreSz = DL.getTypeStoreSize(ATy);
- TypeSize BStoreSz = DL.getTypeStoreSize(BTy);
-
- // If store sizes are not the same, set TypeByteSize to zero, so we can check
- // it in the caller isDependent.
uint64_t ASz = DL.getTypeAllocSize(ATy);
uint64_t BSz = DL.getTypeAllocSize(BTy);
- uint64_t TypeByteSize = (AStoreSz == BStoreSz) ? BSz : 0;
+
+ // The TypeByteSize is used to scale Distance and VF. In these contexts, the
+ // only size that matters is the size of the Sink.
+ uint64_t TypeByteSize = BSz;
----------------
fhahn wrote:
It's not clear to me why picking the size of the sink is always correct. I've not checked all uses, but intuitively the larger size may serve as an upper bound for some (all?) uses
https://github.com/llvm/llvm-project/pull/122318
More information about the llvm-commits
mailing list