|
LLVM
7.0.0
|
Representation for a specific memory location. More...
#include "llvm/Analysis/MemoryLocation.h"
Public Types | |
| enum | : uint64_t { UnknownSize = ~UINT64_C(0) } |
| UnknownSize - This is a special value which can be used with the size arguments in alias queries to indicate that the caller does not know the sizes of the potential memory references. More... | |
Public Member Functions | |
| MemoryLocation (const Value *Ptr=nullptr, LocationSize Size=UnknownSize, const AAMDNodes &AATags=AAMDNodes()) | |
| MemoryLocation | getWithNewPtr (const Value *NewPtr) const |
| MemoryLocation | getWithNewSize (LocationSize NewSize) const |
| MemoryLocation | getWithoutAATags () const |
| bool | operator== (const MemoryLocation &Other) const |
Public Attributes | |
| const Value * | Ptr |
| The address of the start of the location. More... | |
| LocationSize | Size |
| The maximum size of the location, in address-units, or UnknownSize if the size is not known. More... | |
| AAMDNodes | AATags |
| The metadata nodes which describes the aliasing of the location (each member is null if that kind of information is unavailable). More... | |
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.
Definition at line 49 of file MemoryLocation.h.
| anonymous enum : uint64_t |
UnknownSize - This is a special value which can be used with the size arguments in alias queries to indicate that the caller does not know the sizes of the potential memory references.
| Enumerator | |
|---|---|
| UnknownSize | |
Definition at line 54 of file MemoryLocation.h.
|
inlineexplicit |
Definition at line 114 of file MemoryLocation.h.
Referenced by get(), llvm::DenseMapInfo< MemoryLocation >::getEmptyKey(), getForArgument(), getForDest(), getForSource(), and llvm::DenseMapInfo< MemoryLocation >::getTombstoneKey().
|
static |
Return a location with information about the memory reference by the given instruction.
Definition at line 21 of file MemoryLocation.cpp.
References AATags, llvm::Instruction::getAAMetadata(), llvm::Module::getDataLayout(), llvm::Instruction::getModule(), llvm::LoadInst::getPointerOperand(), llvm::Value::getType(), and MemoryLocation().
Referenced by canMoveAboveCall(), checkFunctionMemoryAccess(), llvm::MemorySSAUtil::defClobbersUseOrDef(), llvm::DependenceInfo::depends(), llvm::MemorySSAAnnotatedWriter::emitInstructionAnnot(), findSafeStoreForStoreStrongContraction(), GetLocation(), getLocation(), getLocForWrite(), llvm::AAResults::getModRefInfo(), llvm::MemoryDependenceResults::getNonLocalPointerDependency(), llvm::MemoryDependenceResults::getSimplePointerDependencyFrom(), llvm::DependenceInfo::getSplitIteration(), llvm::DenseMapInfo< CallValue >::getTombstoneKey(), handleEndBlock(), isSafeToMove(), isSafeToPromoteArgument(), memoryIsNotModifiedBetween(), moveUp(), llvm::MemoryDepChecker::Dependence::print(), propagateMetadata(), and llvm::AAEvaluator::run().
|
static |
Definition at line 30 of file MemoryLocation.cpp.
References AATags, llvm::Instruction::getAAMetadata(), llvm::Module::getDataLayout(), llvm::Instruction::getModule(), llvm::StoreInst::getPointerOperand(), llvm::Value::getType(), llvm::StoreInst::getValueOperand(), and MemoryLocation().
|
static |
Definition at line 40 of file MemoryLocation.cpp.
References AATags, llvm::Instruction::getAAMetadata(), llvm::VAArgInst::getPointerOperand(), MemoryLocation(), and UnknownSize.
|
static |
Definition at line 47 of file MemoryLocation.cpp.
References AATags, llvm::Instruction::getAAMetadata(), llvm::AtomicCmpXchgInst::getCompareOperand(), llvm::Module::getDataLayout(), llvm::Instruction::getModule(), llvm::AtomicCmpXchgInst::getPointerOperand(), llvm::Value::getType(), and MemoryLocation().
|
static |
Definition at line 57 of file MemoryLocation.cpp.
References AATags, llvm::Instruction::getAAMetadata(), llvm::Module::getDataLayout(), llvm::Instruction::getModule(), llvm::AtomicRMWInst::getPointerOperand(), llvm::Value::getType(), llvm::AtomicRMWInst::getValOperand(), and MemoryLocation().
|
inlinestatic |
Definition at line 79 of file MemoryLocation.h.
References getOrNone().
|
static |
Return a location representing a particular argument of a call.
Definition at line 109 of file MemoryLocation.cpp.
References AATags, Arg, assert(), F(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getArgument(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::TargetLibraryInfo::getLibFunc(), llvm::DataLayout::getTypeStoreSize(), llvm::TargetLibraryInfo::has(), MemoryLocation(), and UnknownSize.
Referenced by GetLocation(), llvm::AAResults::getModRefInfo(), getOrNone(), and llvm::DenseMapInfo< CallValue >::getTombstoneKey().
|
static |
Return a location representing the destination of a memory set or transfer.
Definition at line 88 of file MemoryLocation.cpp.
Referenced by getForDest(), getLocForWrite(), llvm::BasicAAResult::getModRefInfo(), getOrNone(), and moveUp().
|
static |
Definition at line 92 of file MemoryLocation.cpp.
References getForDest().
|
static |
Definition at line 96 of file MemoryLocation.cpp.
References AATags, C, llvm::Instruction::getAAMetadata(), llvm::MemIntrinsicBase< Derived >::getLength(), llvm::MemIntrinsicBase< Derived >::getRawDest(), MemoryLocation(), Size, and UnknownSize.
|
static |
Return a location representing the source of a memory transfer.
Definition at line 67 of file MemoryLocation.cpp.
Referenced by getForSource(), getLocForRead(), llvm::BasicAAResult::getModRefInfo(), getOrNone(), and moveUp().
|
static |
Definition at line 71 of file MemoryLocation.cpp.
References getForSource().
|
static |
Definition at line 75 of file MemoryLocation.cpp.
References AATags, C, llvm::Instruction::getAAMetadata(), llvm::MemIntrinsicBase< Derived >::getLength(), llvm::MemTransferBase< BaseCL >::getRawSource(), MemoryLocation(), Size, and UnknownSize.
|
inlinestatic |
Definition at line 82 of file MemoryLocation.h.
References getForArgument(), getForDest(), getForSource(), llvm::Instruction::getOpcode(), llvm::SPII::Load, MI, llvm::None, and llvm::SPII::Store.
Referenced by get(), and llvm::DenseMapInfo< CallValue >::getTombstoneKey().
|
inline |
Definition at line 119 of file MemoryLocation.h.
References Ptr.
Referenced by SortNonLocalDepInfoCache().
|
inline |
Definition at line 125 of file MemoryLocation.h.
References Size.
Referenced by SortNonLocalDepInfoCache().
|
inline |
Definition at line 131 of file MemoryLocation.h.
References AATags.
Referenced by SortNonLocalDepInfoCache().
|
inline |
Definition at line 137 of file MemoryLocation.h.
| AAMDNodes llvm::MemoryLocation::AATags |
The metadata nodes which describes the aliasing of the location (each member is null if that kind of information is unavailable).
Definition at line 70 of file MemoryLocation.h.
Referenced by llvm::SCEVAAResult::alias(), llvm::ScopedNoAliasAAResult::alias(), llvm::TypeBasedAAResult::alias(), llvm::objcarc::ObjCARCAAResult::alias(), llvm::BasicAAResult::alias(), get(), getForArgument(), getForDest(), getForSource(), llvm::DenseMapInfo< MemoryLocation >::getHashValue(), llvm::ScopedNoAliasAAResult::getModRefInfo(), llvm::TypeBasedAAResult::getModRefInfo(), getWithoutAATags(), operator==(), llvm::TypeBasedAAResult::pointsToConstantMemory(), llvm::objcarc::ObjCARCAAResult::pointsToConstantMemory(), llvm::MemoryDepChecker::Dependence::print(), llvm::RuntimePointerChecking::print(), SortNonLocalDepInfoCache(), and underlyingObjectsAlias().
The address of the start of the location.
Definition at line 57 of file MemoryLocation.h.
Referenced by llvm::SCEVAAResult::alias(), llvm::AMDGPUAAResult::alias(), llvm::objcarc::ObjCARCAAResult::alias(), llvm::CFLAndersAAResult::alias(), llvm::CFLSteensAAResult::alias(), llvm::BasicAAResult::alias(), llvm::GlobalsAAResult::alias(), llvm::AAResults::callCapturesBefore(), eliminateDeadStores(), findSafeStoreForStoreStrongContraction(), llvm::MemoryDependenceResults::getDependency(), llvm::DenseMapInfo< MemoryLocation >::getHashValue(), GetLocation(), llvm::BasicAAResult::getModRefInfo(), llvm::GlobalsAAResult::getModRefInfo(), llvm::AAResults::getModRefInfo(), llvm::MemoryDependenceResults::getNonLocalPointerDependency(), llvm::slpvectorizer::BoUpSLP::getORE(), llvm::MemoryDependenceResults::getSimplePointerDependencyFrom(), getStoredPointerOperand(), getWithNewPtr(), isOverwrite(), isPossibleSelfRead(), operator==(), llvm::AMDGPUAAResult::pointsToConstantMemory(), llvm::objcarc::ObjCARCAAResult::pointsToConstantMemory(), llvm::BasicAAResult::pointsToConstantMemory(), llvm::RuntimePointerChecking::print(), llvm::CFLAndersAAResult::query(), llvm::CFLSteensAAResult::query(), removeAccessedObjects(), removePartiallyOverlappedStores(), and underlyingObjectsAlias().
| LocationSize llvm::MemoryLocation::Size |
The maximum size of the location, in address-units, or UnknownSize if the size is not known.
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
Definition at line 66 of file MemoryLocation.h.
Referenced by llvm::SCEVAAResult::alias(), llvm::objcarc::ObjCARCAAResult::alias(), llvm::BasicAAResult::alias(), eliminateDeadStores(), getForDest(), getForSource(), llvm::DenseMapInfo< MemoryLocation >::getHashValue(), getWithNewSize(), isOverwrite(), operator==(), llvm::objcarc::ObjCARCAAResult::pointsToConstantMemory(), llvm::CFLAndersAAResult::query(), removePartiallyOverlappedStores(), and SortNonLocalDepInfoCache().
1.8.13