27 DL.getTypeStoreSize(LI->
getType()), AATags);
70 Size =
C->getValue().getZExtValue();
83 Size =
C->getValue().getZExtValue();
97 if (TLI.
has(LibFunc::memset_pattern16) &&
98 MS->
getName() ==
"memset_pattern16") {
114 CS->getAAMetadata(AATags);
119 const DataLayout &
DL = II->getModule()->getDataLayout();
121 switch (II->getIntrinsicID()) {
124 case Intrinsic::memset:
125 case Intrinsic::memcpy:
126 case Intrinsic::memmove:
127 assert((ArgIdx == 0 || ArgIdx == 1) &&
128 "Invalid argument index for memory intrinsic");
129 if (
ConstantInt *LenCI = dyn_cast<ConstantInt>(II->getArgOperand(2)))
133 case Intrinsic::lifetime_start:
134 case Intrinsic::lifetime_end:
135 case Intrinsic::invariant_start:
136 assert(ArgIdx == 1 &&
"Invalid argument index");
138 Arg, cast<ConstantInt>(II->getArgOperand(0))->getZExtValue(),
AATags);
140 case Intrinsic::invariant_end:
141 assert(ArgIdx == 2 &&
"Invalid argument index");
143 Arg, cast<ConstantInt>(II->getArgOperand(1))->getZExtValue(),
AATags);
145 case Intrinsic::arm_neon_vld1:
146 assert(ArgIdx == 0 &&
"Invalid argument index");
151 case Intrinsic::arm_neon_vst1:
152 assert(ArgIdx == 0 &&
"Invalid argument index");
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. ...
ValTy * getArgument(unsigned ArgNo) const
unsigned getNumParams() const
getNumParams - Return the number of fixed parameters this function type requires. ...
InstrTy * getInstruction() const
AtomicCmpXchgInst - an instruction that atomically checks whether a specified value is in a memory lo...
LoadInst - an instruction for reading from memory.
AtomicRMWInst - an instruction that atomically reads a memory location, combines it with another valu...
StringRef getName() const
Return a constant reference to the value's name.
bool has(LibFunc::Func F) const
Tests whether a library function is available.
Value * getPointerOperand()
Value * getPointerOperand()
FunctionType - Class to represent function types.
static bool isMemsetPattern16(const Function *MS, const TargetLibraryInfo &TLI)
static MemoryLocation getForDest(const MemIntrinsic *MI)
Return a location representing the destination of a memory set or transfer.
StoreInst - an instruction for storing to memory.
static MemoryLocation get(const LoadInst *LI)
Return a location with information about the memory reference by the given instruction.
Type * getParamType(unsigned i) const
Parameter type accessors.
FunTy * getCalledFunction() const
getCalledFunction - Return the function being called if this is a direct call, otherwise return null ...
Value * getCompareOperand()
Value * getRawDest() const
Value * getPointerOperand()
VAArgInst - This class represents the va_arg llvm instruction, which returns an argument of the speci...
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.
MemIntrinsic - This is the common base class for memset/memcpy/memmove.
This is the shared class of boolean and integer constants.
const Module * getModule() const
Return the module owning the function this instruction belongs to or nullptr it the function does not...
Module.h This file contains the declarations for the Module class.
Type * getType() const
All values are typed, get the type of this value.
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 * getLength() const
MemTransferInst - This class wraps the llvm.memcpy/memmove intrinsics.
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
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()
void getAAMetadata(AAMDNodes &N, bool Merge=false) const
getAAMetadata - Fills the AAMDNodes structure with AA metadata from this instruction.
ImmutableCallSite - establish a view to a call site for examination.
FunctionType * getFunctionType() const
uint64_t getTypeStoreSize(Type *Ty) const
Returns the maximum number of bytes that may be overwritten by storing the specified type...
Value * getRawSource() const
get* - Return the arguments to the instruction.
LLVM Value Representation.
MemoryLocation(const Value *Ptr=nullptr, uint64_t Size=UnknownSize, const AAMDNodes &AATags=AAMDNodes())
Value * getPointerOperand()
IntrinsicInst - A useful wrapper class for inspecting calls to intrinsic functions.
uint64_t Size
The maximum size of the location, in address-units, or UnknownSize if the size is not known...
static MemoryLocation getForSource(const MemTransferInst *MTI)
Return a location representing the source of a memory transfer.