[llvm] [LAA] Prepare to handle diff type sizes v2 (NFC) (PR #161238)

Andrei Elovikov via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 28 13:46:54 PDT 2026


================
@@ -419,29 +419,30 @@ class MemoryDepChecker {
     uint64_t MaxStride;
     std::optional<uint64_t> CommonStride;
 
-    /// TypeByteSize is either the common store size of both accesses, or 0 when
-    /// store sizes mismatch.
-    uint64_t TypeByteSize;
+    /// TypeByteSize is a pair of alloc sizes of the source and sink.
+    std::pair<uint64_t, uint64_t> TypeByteSize;
+
+    // HasSameSize is a boolean indicating whether the store sizes of the source
+    // and sink are equal.
+    // TODO: Remove this.
+    bool HasSameSize;
----------------
eas wrote:

It was very subtle to understand that this and `TypeByteSize` above use different sizes. I'm not sure if you're going to address the TODO in this PR, but if not, then maybe rename to `HaveSameStoreSize`?

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


More information about the llvm-commits mailing list