27 DL.getTypeStoreSize(LI->
getType()), AATags);
78 Size =
C->getValue().getZExtValue();
99 Size =
C->getValue().getZExtValue();
113 CS->getAAMetadata(AATags);
118 const DataLayout &DL = II->getModule()->getDataLayout();
120 switch (II->getIntrinsicID()) {
123 case Intrinsic::memset:
124 case Intrinsic::memcpy:
125 case Intrinsic::memmove:
126 assert((ArgIdx == 0 || ArgIdx == 1) &&
127 "Invalid argument index for memory intrinsic");
128 if (
ConstantInt *LenCI = dyn_cast<ConstantInt>(II->getArgOperand(2)))
132 case Intrinsic::lifetime_start:
133 case Intrinsic::lifetime_end:
134 case Intrinsic::invariant_start:
135 assert(ArgIdx == 1 &&
"Invalid argument index");
137 Arg, cast<ConstantInt>(II->getArgOperand(0))->getZExtValue(),
AATags);
139 case Intrinsic::invariant_end:
140 assert(ArgIdx == 2 &&
"Invalid argument index");
142 Arg, cast<ConstantInt>(II->getArgOperand(1))->getZExtValue(),
AATags);
144 case Intrinsic::arm_neon_vld1:
145 assert(ArgIdx == 0 &&
"Invalid argument index");
150 case Intrinsic::arm_neon_vst1:
151 assert(ArgIdx == 0 &&
"Invalid argument index");
163 F == LibFunc_memset_pattern16 && TLI.
has(F)) {
164 assert((ArgIdx == 0 || ArgIdx == 1) &&
165 "Invalid argument index for memset_pattern16");
Value * getValueOperand()
A parsed version of the target data layout string in and methods for querying it. ...
Compute iterated dominance frontiers using a linear time algorithm.
an instruction that atomically checks whether a specified value is in a memory location, and, if it is, stores a new value there.
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
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
InstrTy * getInstruction() const
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.
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()
LocationSize Size
The maximum size of the location, in address-units, or UnknownSize if the size is not known...
Value * getPointerOperand()
This class represents the va_arg llvm instruction, which returns an argument of the specified type gi...
static MemoryLocation getForArgument(ImmutableCallSite CS, unsigned ArgIdx, const TargetLibraryInfo &TLI)
Return a location representing a particular argument of a call.
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.
ValTy * getArgument(unsigned ArgNo) const
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...
MemoryLocation(const Value *Ptr=nullptr, LocationSize Size=UnknownSize, const AAMDNodes &AATags=AAMDNodes())
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
This class wraps the llvm.memcpy/memmove intrinsics.
AAMDNodes AATags
The metadata nodes which describes the aliasing of the location (each member is null if that kind of ...
This file provides utility analysis objects describing memory locations.
Value * getPointerOperand()
Establish a view to a call site for examination.
FunTy * getCalledFunction() const
Return the function being called if this is a direct call, otherwise return null (if it's an indirect...
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...
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.