16 #ifndef LLVM_ANALYSIS_MEMORYLOCATION_H 17 #define LLVM_ANALYSIS_MEMORYLOCATION_H 28 class MemTransferInst;
30 class AtomicMemTransferInst;
31 class AtomicMemIntrinsic;
32 class AnyMemTransferInst;
33 class AnyMemIntrinsic;
34 class TargetLibraryInfo;
85 return get(cast<LoadInst>(Inst));
87 return get(cast<StoreInst>(Inst));
88 case Instruction::VAArg:
89 return get(cast<VAArgInst>(Inst));
90 case Instruction::AtomicCmpXchg:
91 return get(cast<AtomicCmpXchgInst>(Inst));
92 case Instruction::AtomicRMW:
93 return get(cast<AtomicRMWInst>(Inst));
117 : Ptr(Ptr), Size(Size), AATags(AATags) {}
138 return Ptr == Other.
Ptr && Size == Other.
Size && AATags == Other.
AATags;
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.
MemoryLocation getWithNewPtr(const Value *NewPtr) const
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.
static Optional< MemoryLocation > getOrNone(const Instruction *Inst)
static MemoryLocation getForDest(const MemIntrinsic *MI)
Return a location representing the destination of a memory set or transfer.
unsigned getOpcode() const
Returns a member of one of the enums like Instruction::Add.
An instruction for storing to memory.
MemoryLocation getWithoutAATags() const
MemoryLocation getWithNewSize(LocationSize NewSize) const
LocationSize Size
The maximum size of the location, in address-units, or UnknownSize if the size is not known...
bool operator==(const MemoryLocation &Other) const
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.
const Value * Ptr
The address of the start of the location.
Representation for a specific memory location.
This is the common base class for memset/memcpy/memmove.
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())
static bool isEqual(const MemoryLocation &LHS, const MemoryLocation &RHS)
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 ...
Establish a view to a call site for examination.
LLVM Value Representation.
static MemoryLocation getTombstoneKey()
static MemoryLocation getEmptyKey()
static unsigned getHashValue(const MemoryLocation &Val)
static MemoryLocation getForSource(const MemTransferInst *MTI)
Return a location representing the source of a memory transfer.