27 DL.getTypeStoreSize(LI->
getType()), AATags);
70 Size =
C->getValue().getZExtValue();
83 Size =
C->getValue().getZExtValue();
97 CS->getAAMetadata(AATags);
102 const DataLayout &DL = II->getModule()->getDataLayout();
104 switch (II->getIntrinsicID()) {
107 case Intrinsic::memset:
108 case Intrinsic::memcpy:
109 case Intrinsic::memmove:
110 assert((ArgIdx == 0 || ArgIdx == 1) &&
111 "Invalid argument index for memory intrinsic");
112 if (
ConstantInt *LenCI = dyn_cast<ConstantInt>(II->getArgOperand(2)))
116 case Intrinsic::lifetime_start:
117 case Intrinsic::lifetime_end:
118 case Intrinsic::invariant_start:
119 assert(ArgIdx == 1 &&
"Invalid argument index");
121 Arg, cast<ConstantInt>(II->getArgOperand(0))->getZExtValue(),
AATags);
123 case Intrinsic::invariant_end:
124 assert(ArgIdx == 2 &&
"Invalid argument index");
126 Arg, cast<ConstantInt>(II->getArgOperand(1))->getZExtValue(),
AATags);
128 case Intrinsic::arm_neon_vld1:
129 assert(ArgIdx == 0 &&
"Invalid argument index");
134 case Intrinsic::arm_neon_vst1:
135 assert(ArgIdx == 0 &&
"Invalid argument index");
147 F == LibFunc::memset_pattern16 && TLI.
has(F)) {
148 assert((ArgIdx == 0 || ArgIdx == 1) &&
149 "Invalid argument index for memset_pattern16");
Value * getValueOperand()
A parsed version of the target data layout string in and methods for querying it. ...
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.
bool has(LibFunc::Func F) const
Tests whether a library function is available.
Value * getPointerOperand()
Value * getPointerOperand()
static MemoryLocation getForDest(const MemIntrinsic *MI)
Return a location representing the destination of a memory set or transfer.
An instruction for storing to memory.
bool getLibFunc(StringRef funcName, LibFunc::Func &F) const
Searches for a particular function name.
static MemoryLocation get(const LoadInst *LI)
Return a location with information about the memory reference by the given instruction.
Value * getCompareOperand()
Value * getRawDest() const
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.
InstrTy * getInstruction() const
ValTy * getArgument(unsigned ArgNo) const
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
static GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
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
Fills the AAMDNodes structure with AA metadata from this instruction.
ImmutableCallSite - establish a view to a call site for examination.
uint64_t getTypeStoreSize(Type *Ty) const
Returns the maximum number of bytes that may be overwritten by storing the specified type...
Value * getRawSource() const
Return the arguments to the instruction.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
FunTy * getCalledFunction() const
getCalledFunction - Return the function being called if this is a direct call, otherwise return null ...
LLVM Value Representation.
MemoryLocation(const Value *Ptr=nullptr, uint64_t Size=UnknownSize, const AAMDNodes &AATags=AAMDNodes())
Value * getPointerOperand()
A 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.