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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 03:50:06 PDT 2023


================
@@ -111,13 +111,13 @@ static std::optional<uint64_t> getObjectSize(const Value *V,
   Opts.RoundToAlign = RoundToAlign;
   Opts.NullIsUnknownSize = NullIsValidLoc;
   if (getObjectSize(V, Size, DL, &TLI, Opts))
-    return Size;
+    return TypeSize::getFixed(Size);
   return std::nullopt;
 }
 
 /// Returns true if we can prove that the object specified by V is smaller than
 /// Size.
-static bool isObjectSmallerThan(const Value *V, uint64_t Size,
+static bool isObjectSmallerThan(const Value *V, LocationSize Size,
----------------
nikic wrote:

I think if you make this accept `TypeSize` instead, and then...

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


More information about the llvm-commits mailing list