Replace most users of UnknownSize with LocationSize::unknown(); NFC
Moving away from UnknownSize is part of the effort to migrate us to
LocationSizes (e.g. the cleanup promised in D44748).
This doesn't entirely remove all of the uses of UnknownSize; some uses
require tweaks to assume that UnknownSize isn't just some kind of int.
This patch is intended to just be a trivial replacement for all places
where LocationSize::unknown() will Just Work.
llvm-svn: 344186
diff --git a/llvm/lib/Analysis/MemoryLocation.cpp b/llvm/lib/Analysis/MemoryLocation.cpp
index 3cd4b44..c0605f6 100644
--- a/llvm/lib/Analysis/MemoryLocation.cpp
+++ b/llvm/lib/Analysis/MemoryLocation.cpp
@@ -55,7 +55,8 @@
AAMDNodes AATags;
VI->getAAMetadata(AATags);
- return MemoryLocation(VI->getPointerOperand(), UnknownSize, AATags);
+ return MemoryLocation(VI->getPointerOperand(), LocationSize::unknown(),
+ AATags);
}
MemoryLocation MemoryLocation::get(const AtomicCmpXchgInst *CXI) {
@@ -87,7 +88,7 @@
}
MemoryLocation MemoryLocation::getForSource(const AnyMemTransferInst *MTI) {
- uint64_t Size = UnknownSize;
+ uint64_t Size = MemoryLocation::UnknownSize;
if (ConstantInt *C = dyn_cast<ConstantInt>(MTI->getLength()))
Size = C->getValue().getZExtValue();
@@ -108,7 +109,7 @@
}
MemoryLocation MemoryLocation::getForDest(const AnyMemIntrinsic *MI) {
- uint64_t Size = UnknownSize;
+ uint64_t Size = MemoryLocation::UnknownSize;
if (ConstantInt *C = dyn_cast<ConstantInt>(MI->getLength()))
Size = C->getValue().getZExtValue();
@@ -189,5 +190,6 @@
}
// FIXME: Handle memset_pattern4 and memset_pattern8 also.
- return MemoryLocation(CS.getArgument(ArgIdx), UnknownSize, AATags);
+ return MemoryLocation(CS.getArgument(ArgIdx), LocationSize::unknown(),
+ AATags);
}