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

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 20 02:09:11 PDT 2025


================
@@ -411,29 +411,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 SourceSize and SinkSize.
+    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;
----------------
fhahn wrote:

Do we really need this field? We can just compare the entries in `TypeByteSize` when needed in the caller?

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


More information about the llvm-commits mailing list