[llvm] LAA: generalize strides over unequal type sizes (PR #108088)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 17 05:36:38 PST 2024


================
@@ -1972,30 +1969,68 @@ MemoryDepChecker::getDependenceDistanceStrideAndSize(
     return MemoryDepChecker::Dependence::IndirectUnsafe;
   }
 
-  int64_t StrideAPtrInt = *StrideAPtr;
-  int64_t StrideBPtrInt = *StrideBPtr;
-  LLVM_DEBUG(dbgs() << "LAA:  Src induction step: " << StrideAPtrInt
-                    << " Sink induction step: " << StrideBPtrInt << "\n");
+  LLVM_DEBUG(dbgs() << "LAA:  Src induction step: " << *StrideAPtr
+                    << " Sink induction step: " << *StrideBPtr << "\n");
+
+  // Note that store size is different from alloc size, which is dependent on
+  // store size. We use the former for checking illegal cases, and the latter
----------------
david-arm wrote:

By `former` I assume you mean `store size? I think it's clearer to write out exactly what you're referring to, i.e. `We use the store size for checking illegal cases, and the alloc size for scaling strides.`

https://github.com/llvm/llvm-project/pull/108088


More information about the llvm-commits mailing list