16 #ifndef LLVM_ANALYSIS_MEMORYLOCATION_H
17 #define LLVM_ANALYSIS_MEMORYLOCATION_H
27 class MemTransferInst;
29 class TargetLibraryInfo;
71 if (
auto *
I = dyn_cast<LoadInst>(Inst))
73 else if (
auto *
I = dyn_cast<StoreInst>(Inst))
75 else if (
auto *
I = dyn_cast<VAArgInst>(Inst))
77 else if (
auto *
I = dyn_cast<AtomicCmpXchgInst>(Inst))
79 else if (
auto *
I = dyn_cast<AtomicRMWInst>(Inst))
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.
MemoryLocation getWithNewSize(uint64_t NewSize) const
MemoryLocation getWithoutAATags() const
MemoryLocation getWithNewPtr(const Value *NewPtr) const
static MemoryLocation getForDest(const MemIntrinsic *MI)
Return a location representing the destination of a memory set or transfer.
An instruction for storing to memory.
This class represents the va_arg llvm instruction, which returns an argument of the specified type gi...
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
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.
bool operator==(const MemoryLocation &Other) const
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...
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 ...
ImmutableCallSite - establish a view to a call site for examination.
LLVM Value Representation.
MemoryLocation(const Value *Ptr=nullptr, uint64_t Size=UnknownSize, const AAMDNodes &AATags=AAMDNodes())
static MemoryLocation getTombstoneKey()
static MemoryLocation getEmptyKey()
static unsigned getHashValue(const MemoryLocation &Val)
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.