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

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 07:38:09 PDT 2023


================
@@ -205,16 +205,16 @@ static bool isShortenableAtTheBeginning(Instruction *I) {
   return isa<AnyMemSetInst>(I);
 }
 
-static uint64_t getPointerSize(const Value *V, const DataLayout &DL,
-                               const TargetLibraryInfo &TLI,
-                               const Function *F) {
+static LocationSize getPointerSize(const Value *V, const DataLayout &DL,
+                                   const TargetLibraryInfo &TLI,
+                                   const Function *F) {
   uint64_t Size;
   ObjectSizeOpts Opts;
   Opts.NullIsUnknownSize = NullPointerIsDefined(F);
 
   if (getObjectSize(V, Size, DL, &TLI, Opts))
-    return Size;
-  return MemoryLocation::UnknownSize;
+    return LocationSize(Size);
+  return LocationSize(MemoryLocation::UnknownSize);
----------------
nikic wrote:

Same note here, I don't think this LocationSize wrapper adds anything.

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


More information about the llvm-commits mailing list