class MemoryLocation
Declaration
class MemoryLocation { /* full declaration omitted */ };
Description
Representation for a specific memory location. This abstraction can be used to represent a specific location in memory. The goal of the location is to represent enough information to describe abstract aliasing, modification, and reference behaviors of whatever value(s) are stored in memory at the particular location. The primary user of this interface is LLVM's Alias Analysis, but other memory analyses such as MemoryDependence can use it as well.
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:210
Member Variables
- public const llvm::Value* Ptr
- The address of the start of the location.
- public llvm::LocationSize Size
- Note that an unknown size does not mean the pointer aliases the entire virtual address space, because there are restrictions on stepping out of one object and into another. See http://llvm.org/docs/LangRef.html#pointeraliasing
- public llvm::AAMDNodes AATags
- The metadata nodes which describes the aliasing of the location (each member is null if that kind of information is unavailable).
Method Overview
- public MemoryLocation(const llvm::Value * Ptr, llvm::LocationSize Size, const llvm::AAMDNodes & AATags = llvm::AAMDNodes())
- public MemoryLocation()
- public static llvm::MemoryLocation get(const llvm::LoadInst * LI)
- public static llvm::MemoryLocation get(const llvm::StoreInst * SI)
- public static llvm::MemoryLocation get(const llvm::VAArgInst * VI)
- public static llvm::MemoryLocation get(const llvm::AtomicCmpXchgInst * CXI)
- public static llvm::MemoryLocation get(const llvm::AtomicRMWInst * RMWI)
- public static llvm::MemoryLocation get(const llvm::Instruction * Inst)
- public static llvm::MemoryLocation getAfter(const llvm::Value * Ptr, const llvm::AAMDNodes & AATags = llvm::AAMDNodes())
- public static llvm::MemoryLocation getBeforeOrAfter(const llvm::Value * Ptr, const llvm::AAMDNodes & AATags = llvm::AAMDNodes())
- public static llvm::MemoryLocation getForArgument(const llvm::CallBase * Call, unsigned int ArgIdx, const llvm::TargetLibraryInfo & TLI)
- public static llvm::MemoryLocation getForArgument(const llvm::CallBase * Call, unsigned int ArgIdx, const llvm::TargetLibraryInfo * TLI)
- public static llvm::MemoryLocation getForDest(const llvm::AtomicMemIntrinsic * MI)
- public static Optional<llvm::MemoryLocation> getForDest(const llvm::CallBase * CI, const llvm::TargetLibraryInfo & TLI)
- public static llvm::MemoryLocation getForDest(const llvm::AnyMemIntrinsic * MI)
- public static llvm::MemoryLocation getForDest(const llvm::MemIntrinsic * MI)
- public static llvm::MemoryLocation getForSource(const llvm::AnyMemTransferInst * MTI)
- public static llvm::MemoryLocation getForSource(const llvm::AtomicMemTransferInst * MTI)
- public static llvm::MemoryLocation getForSource(const llvm::MemTransferInst * MTI)
- public static Optional<llvm::MemoryLocation> getOrNone(const llvm::Instruction * Inst)
- public static uint64_t getSizeOrUnknown(const llvm::TypeSize & T)
- public llvm::MemoryLocation getWithNewPtr(const llvm::Value * NewPtr) const
- public llvm::MemoryLocation getWithNewSize(llvm::LocationSize NewSize) const
- public llvm::MemoryLocation getWithoutAATags() const
- public void print(llvm::raw_ostream & OS) const
Methods
¶MemoryLocation(const llvm::Value* Ptr,
llvm::LocationSize Size,
const llvm::AAMDNodes& AATags =
llvm::AAMDNodes())
MemoryLocation(const llvm::Value* Ptr,
llvm::LocationSize Size,
const llvm::AAMDNodes& AATags =
llvm::AAMDNodes())
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:290
Parameters
- const llvm::Value* Ptr
- llvm::LocationSize Size
- const llvm::AAMDNodes& AATags = llvm::AAMDNodes()
¶MemoryLocation()
MemoryLocation()
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:288
¶static llvm::MemoryLocation get(
const llvm::LoadInst* LI)
static llvm::MemoryLocation get(
const llvm::LoadInst* LI)
Description
Return a location with information about the memory reference by the given instruction.
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:237
Parameters
- const llvm::LoadInst* LI
¶static llvm::MemoryLocation get(
const llvm::StoreInst* SI)
static llvm::MemoryLocation get(
const llvm::StoreInst* SI)
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:238
Parameters
- const llvm::StoreInst* SI
¶static llvm::MemoryLocation get(
const llvm::VAArgInst* VI)
static llvm::MemoryLocation get(
const llvm::VAArgInst* VI)
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:239
Parameters
- const llvm::VAArgInst* VI
¶static llvm::MemoryLocation get(
const llvm::AtomicCmpXchgInst* CXI)
static llvm::MemoryLocation get(
const llvm::AtomicCmpXchgInst* CXI)
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:240
Parameters
- const llvm::AtomicCmpXchgInst* CXI
¶static llvm::MemoryLocation get(
const llvm::AtomicRMWInst* RMWI)
static llvm::MemoryLocation get(
const llvm::AtomicRMWInst* RMWI)
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:241
Parameters
- const llvm::AtomicRMWInst* RMWI
¶static llvm::MemoryLocation get(
const llvm::Instruction* Inst)
static llvm::MemoryLocation get(
const llvm::Instruction* Inst)
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:242
Parameters
- const llvm::Instruction* Inst
¶static llvm::MemoryLocation getAfter(
const llvm::Value* Ptr,
const llvm::AAMDNodes& AATags =
llvm::AAMDNodes())
static llvm::MemoryLocation getAfter(
const llvm::Value* Ptr,
const llvm::AAMDNodes& AATags =
llvm::AAMDNodes())
Description
Return a location that may access any location after Ptr, while remaining within the underlying object.
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:270
Parameters
- const llvm::Value* Ptr
- const llvm::AAMDNodes& AATags = llvm::AAMDNodes()
¶static llvm::MemoryLocation getBeforeOrAfter(
const llvm::Value* Ptr,
const llvm::AAMDNodes& AATags =
llvm::AAMDNodes())
static llvm::MemoryLocation getBeforeOrAfter(
const llvm::Value* Ptr,
const llvm::AAMDNodes& AATags =
llvm::AAMDNodes())
Description
Return a location that may access any location before or after Ptr, while remaining within the underlying object.
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:278
Parameters
- const llvm::Value* Ptr
- const llvm::AAMDNodes& AATags = llvm::AAMDNodes()
¶static llvm::MemoryLocation getForArgument(
const llvm::CallBase* Call,
unsigned int ArgIdx,
const llvm::TargetLibraryInfo& TLI)
static llvm::MemoryLocation getForArgument(
const llvm::CallBase* Call,
unsigned int ArgIdx,
const llvm::TargetLibraryInfo& TLI)
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:263
Parameters
- const llvm::CallBase* Call
- unsigned int ArgIdx
- const llvm::TargetLibraryInfo& TLI
¶static llvm::MemoryLocation getForArgument(
const llvm::CallBase* Call,
unsigned int ArgIdx,
const llvm::TargetLibraryInfo* TLI)
static llvm::MemoryLocation getForArgument(
const llvm::CallBase* Call,
unsigned int ArgIdx,
const llvm::TargetLibraryInfo* TLI)
Description
Return a location representing a particular argument of a call.
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:261
Parameters
- const llvm::CallBase* Call
- unsigned int ArgIdx
- const llvm::TargetLibraryInfo* TLI
¶static llvm::MemoryLocation getForDest(
const llvm::AtomicMemIntrinsic* MI)
static llvm::MemoryLocation getForDest(
const llvm::AtomicMemIntrinsic* MI)
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:255
Parameters
- const llvm::AtomicMemIntrinsic* MI
¶static Optional<llvm::MemoryLocation> getForDest(
const llvm::CallBase* CI,
const llvm::TargetLibraryInfo& TLI)
static Optional<llvm::MemoryLocation> getForDest(
const llvm::CallBase* CI,
const llvm::TargetLibraryInfo& TLI)
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:257
Parameters
- const llvm::CallBase* CI
- const llvm::TargetLibraryInfo& TLI
¶static llvm::MemoryLocation getForDest(
const llvm::AnyMemIntrinsic* MI)
static llvm::MemoryLocation getForDest(
const llvm::AnyMemIntrinsic* MI)
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:256
Parameters
- const llvm::AnyMemIntrinsic* MI
¶static llvm::MemoryLocation getForDest(
const llvm::MemIntrinsic* MI)
static llvm::MemoryLocation getForDest(
const llvm::MemIntrinsic* MI)
Description
Return a location representing the destination of a memory set or transfer.
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:254
Parameters
- const llvm::MemIntrinsic* MI
¶static llvm::MemoryLocation getForSource(
const llvm::AnyMemTransferInst* MTI)
static llvm::MemoryLocation getForSource(
const llvm::AnyMemTransferInst* MTI)
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:250
Parameters
- const llvm::AnyMemTransferInst* MTI
¶static llvm::MemoryLocation getForSource(
const llvm::AtomicMemTransferInst* MTI)
static llvm::MemoryLocation getForSource(
const llvm::AtomicMemTransferInst* MTI)
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:249
Parameters
- const llvm::AtomicMemTransferInst* MTI
¶static llvm::MemoryLocation getForSource(
const llvm::MemTransferInst* MTI)
static llvm::MemoryLocation getForSource(
const llvm::MemTransferInst* MTI)
Description
Return a location representing the source of a memory transfer.
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:248
Parameters
- const llvm::MemTransferInst* MTI
¶static Optional<llvm::MemoryLocation> getOrNone(
const llvm::Instruction* Inst)
static Optional<llvm::MemoryLocation> getOrNone(
const llvm::Instruction* Inst)
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:245
Parameters
- const llvm::Instruction* Inst
¶static uint64_t getSizeOrUnknown(
const llvm::TypeSize& T)
static uint64_t getSizeOrUnknown(
const llvm::TypeSize& T)
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:284
Parameters
- const llvm::TypeSize& T
¶llvm::MemoryLocation getWithNewPtr(
const llvm::Value* NewPtr) const
llvm::MemoryLocation getWithNewPtr(
const llvm::Value* NewPtr) const
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:294
Parameters
- const llvm::Value* NewPtr
¶llvm::MemoryLocation getWithNewSize(
llvm::LocationSize NewSize) const
llvm::MemoryLocation getWithNewSize(
llvm::LocationSize NewSize) const
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:300
Parameters
- llvm::LocationSize NewSize
¶llvm::MemoryLocation getWithoutAATags() const
llvm::MemoryLocation getWithoutAATags() const
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:306
¶void print(llvm::raw_ostream& OS) const
void print(llvm::raw_ostream& OS) const
Declared at: llvm/include/llvm/Analysis/MemoryLocation.h:233