[llvm] [Analysis] Add Scalable field in MemoryLocation.h (PR #65759)

via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 14 02:30:22 PDT 2023


================
@@ -984,9 +985,15 @@ struct DSEState {
       return isMaskedStoreOverwrite(KillingI, DeadI, BatchAA);
     }
 
-    const uint64_t KillingSize = KillingLocSize.getValue();
-    const uint64_t DeadSize = DeadLoc.Size.getValue();
+    const TypeSize KillingSize = KillingLocSize.getValue();
+    const TypeSize DeadSize = DeadLoc.Size.getValue();
+    const bool AnyScalable =
+        DeadSize.isScalable() || KillingLocSize.isScalable();
 
+    // TODO: Remove AnyScalable constraint once alias analysis fully support
+    // scalable quantities
----------------
harviniriawan wrote:

there's more down below that performs comparison of size using >=

```    // If we hit a partial alias we may have a full overwrite
    if (AAR == AliasResult::PartialAlias && AAR.hasOffset()) {
      int32_t Off = AAR.getOffset();
      if (Off >= 0 && (uint64_t)Off + DeadSize <= KillingSize)
        return OW_Complete;
    }`

Because `AAR.getOffset()` returns an int, not typesize for now.


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


More information about the llvm-commits mailing list