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

Harvin Iriawan via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 23 02:04:44 PDT 2023


================
@@ -98,12 +102,17 @@ class LocationSize {
   // this assumes the provided value is precise.
   constexpr LocationSize(uint64_t Raw)
       : Value(Raw > MaxValue ? AfterPointer : Raw) {}
-
-  static LocationSize precise(uint64_t Value) { return LocationSize(Value); }
+  constexpr LocationSize(uint64_t Raw, bool Scalable)
+      : Value(Raw > MaxValue ? AfterPointer
+                             : Raw | (Scalable ? ScalableBit : uint64_t(0))) {}
----------------
harviniriawan wrote:

agreed

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


More information about the llvm-commits mailing list