22 OS <<
"LocationSize::";
30 OS <<
"precise(" <<
getValue() <<
')';
32 OS <<
"upperBound(" <<
getValue() <<
')';
87 return getForSource(cast<AnyMemTransferInst>(MTI));
91 return getForSource(cast<AnyMemTransferInst>(MTI));
108 return getForDest(cast<AnyMemIntrinsic>(MI));
112 return getForDest(cast<AnyMemIntrinsic>(MI));
136 if (
const IntrinsicInst *II = dyn_cast<IntrinsicInst>(Call)) {
137 const DataLayout &DL = II->getModule()->getDataLayout();
139 switch (II->getIntrinsicID()) {
145 assert((ArgIdx == 0 || ArgIdx == 1) &&
146 "Invalid argument index for memory intrinsic");
147 if (
ConstantInt *LenCI = dyn_cast<ConstantInt>(II->getArgOperand(2)))
155 assert(ArgIdx == 1 &&
"Invalid argument index");
159 cast<ConstantInt>(II->getArgOperand(0))->getZExtValue()),
167 assert(ArgIdx == 2 &&
"Invalid argument index");
171 cast<ConstantInt>(II->getArgOperand(1))->getZExtValue()),
175 assert(ArgIdx == 0 &&
"Invalid argument index");
183 assert(ArgIdx == 0 &&
"Invalid argument index");
186 II->getArgOperand(1)->getType())),
198 F == LibFunc_memset_pattern16 && TLI->
has(F)) {
199 assert((ArgIdx == 0 || ArgIdx == 1) &&
200 "Invalid argument index for memset_pattern16");
Value * getValueOperand()
A parsed version of the target data layout string in and methods for querying it. ...
This class represents lattice values for constants.
an instruction that atomically checks whether a specified value is in a memory location, and, if it is, stores a new value there.
static constexpr LocationSize unknown()
static LocationSize precise(uint64_t Value)
Base class for all callable instructions (InvokeInst and CallInst) Holds everything related to callin...
An instruction for reading from memory.
an instruction that atomically reads a memory location, combines it with another value, and then stores the result back.
Value * getLength() const
Value * getArgOperand(unsigned i) const
static constexpr LocationSize mapTombstone()
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
static MemoryLocation getForArgument(const CallBase *Call, unsigned ArgIdx, const TargetLibraryInfo *TLI)
Return a location representing a particular argument of a call.
Value * getPointerOperand()
Value * getPointerOperand()
Type * getType() const
All values are typed, get the type of this value.
static MemoryLocation getForDest(const MemIntrinsic *MI)
Return a location representing the destination of a memory set or transfer.
bool has(LibFunc F) const
Tests whether a library function is available.
An instruction for storing to memory.
uint64_t getValue() const
void getAAMetadata(AAMDNodes &N, bool Merge=false) const
Fills the AAMDNodes structure with AA metadata from this instruction.
static MemoryLocation get(const LoadInst *LI)
Return a location with information about the memory reference by the given instruction.
Value * getCompareOperand()
static constexpr LocationSize mapEmpty()
Value * getPointerOperand()
This class represents the va_arg llvm instruction, which returns an argument of the specified type gi...
Representation for a specific memory location.
This is the common base class for memset/memcpy/memmove.
This is the shared class of boolean and integer constants.
Module.h This file contains the declarations for the Module class.
Provides information about what library functions are available for the current target.
A collection of metadata nodes that might be associated with a memory access used by the alias-analys...
Value * getRawSource() const
Return the arguments to the instruction.
const Module * getModule() const
Return the module owning the function this instruction belongs to or nullptr it the function does not...
bool getLibFunc(StringRef funcName, LibFunc &F) const
Searches for a particular function name.
amdgpu Simplify well known AMD library false Value Value * Arg
void print(raw_ostream &OS) const
This class wraps the llvm.memcpy/memmove intrinsics.
This file provides utility analysis objects describing memory locations.
Value * getPointerOperand()
Function * getCalledFunction() const
Returns the function called, or null if this is an indirect function invocation.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
uint64_t getTypeStoreSize(Type *Ty) const
Returns the maximum number of bytes that may be overwritten by storing the specified type...
This class implements an extremely fast bulk output stream that can only output to a stream...
Value * getPointerOperand()
Value * getRawDest() const
A wrapper class for inspecting calls to intrinsic functions.
static MemoryLocation getForSource(const MemTransferInst *MTI)
Return a location representing the source of a memory transfer.