|
LLVM
4.0.0
|
#include <AliasAnalysis.h>
Classes | |
| class | Concept |
| A private abstract base class describing the concept of an individual alias analysis implementation. More... | |
Public Member Functions | |
| AAResults (const TargetLibraryInfo &TLI) | |
| AAResults (AAResults &&Arg) | |
| ~AAResults () | |
| template<typename AAResultT > | |
| void | addAAResult (AAResultT &AAResult) |
| Register a specific AA result. More... | |
| void | addAADependencyID (AnalysisKey *ID) |
| Register a function analysis ID that the results aggregation depends on. More... | |
| bool | invalidate (Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &Inv) |
| Handle invalidation events in the new pass manager. More... | |
Alias Queries | |
| AliasResult | alias (const MemoryLocation &LocA, const MemoryLocation &LocB) |
| The main low level interface to the alias analysis implementation. More... | |
| AliasResult | alias (const Value *V1, uint64_t V1Size, const Value *V2, uint64_t V2Size) |
A convenience wrapper around the primary alias interface. More... | |
| AliasResult | alias (const Value *V1, const Value *V2) |
A convenience wrapper around the primary alias interface. More... | |
| bool | isNoAlias (const MemoryLocation &LocA, const MemoryLocation &LocB) |
| A trivial helper function to check to see if the specified pointers are no-alias. More... | |
| bool | isNoAlias (const Value *V1, uint64_t V1Size, const Value *V2, uint64_t V2Size) |
A convenience wrapper around the isNoAlias helper interface. More... | |
| bool | isNoAlias (const Value *V1, const Value *V2) |
A convenience wrapper around the isNoAlias helper interface. More... | |
| bool | isMustAlias (const MemoryLocation &LocA, const MemoryLocation &LocB) |
| A trivial helper function to check to see if the specified pointers are must-alias. More... | |
| bool | isMustAlias (const Value *V1, const Value *V2) |
A convenience wrapper around the isMustAlias helper interface. More... | |
| bool | pointsToConstantMemory (const MemoryLocation &Loc, bool OrLocal=false) |
Checks whether the given location points to constant memory, or if OrLocal is true whether it points to a local alloca. More... | |
| bool | pointsToConstantMemory (const Value *P, bool OrLocal=false) |
A convenience wrapper around the primary pointsToConstantMemory interface. More... | |
Simple mod/ref information | |
| ModRefInfo | getArgModRefInfo (ImmutableCallSite CS, unsigned ArgIdx) |
| Get the ModRef info associated with a pointer argument of a callsite. More... | |
| FunctionModRefBehavior | getModRefBehavior (ImmutableCallSite CS) |
| Return the behavior of the given call site. More... | |
| FunctionModRefBehavior | getModRefBehavior (const Function *F) |
| Return the behavior when calling the given function. More... | |
| bool | doesNotAccessMemory (ImmutableCallSite CS) |
| Checks if the specified call is known to never read or write memory. More... | |
| bool | doesNotAccessMemory (const Function *F) |
| Checks if the specified function is known to never read or write memory. More... | |
| bool | onlyReadsMemory (ImmutableCallSite CS) |
| Checks if the specified call is known to only read from non-volatile memory (or not access memory at all). More... | |
| bool | onlyReadsMemory (const Function *F) |
| Checks if the specified function is known to only read from non-volatile memory (or not access memory at all). More... | |
| ModRefInfo | getModRefInfo (ImmutableCallSite CS, const MemoryLocation &Loc) |
| getModRefInfo (for call sites) - Return information about whether a particular call site modifies or reads the specified memory location. More... | |
| ModRefInfo | getModRefInfo (ImmutableCallSite CS, const Value *P, uint64_t Size) |
| getModRefInfo (for call sites) - A convenience wrapper. More... | |
| ModRefInfo | getModRefInfo (const CallInst *C, const MemoryLocation &Loc) |
| getModRefInfo (for calls) - Return information about whether a particular call modifies or reads the specified memory location. More... | |
| ModRefInfo | getModRefInfo (const CallInst *C, const Value *P, uint64_t Size) |
| getModRefInfo (for calls) - A convenience wrapper. More... | |
| ModRefInfo | getModRefInfo (const InvokeInst *I, const MemoryLocation &Loc) |
| getModRefInfo (for invokes) - Return information about whether a particular invoke modifies or reads the specified memory location. More... | |
| ModRefInfo | getModRefInfo (const InvokeInst *I, const Value *P, uint64_t Size) |
| getModRefInfo (for invokes) - A convenience wrapper. More... | |
| ModRefInfo | getModRefInfo (const LoadInst *L, const MemoryLocation &Loc) |
| getModRefInfo (for loads) - Return information about whether a particular load modifies or reads the specified memory location. More... | |
| ModRefInfo | getModRefInfo (const LoadInst *L, const Value *P, uint64_t Size) |
| getModRefInfo (for loads) - A convenience wrapper. More... | |
| ModRefInfo | getModRefInfo (const StoreInst *S, const MemoryLocation &Loc) |
| getModRefInfo (for stores) - Return information about whether a particular store modifies or reads the specified memory location. More... | |
| ModRefInfo | getModRefInfo (const StoreInst *S, const Value *P, uint64_t Size) |
| getModRefInfo (for stores) - A convenience wrapper. More... | |
| ModRefInfo | getModRefInfo (const FenceInst *S, const MemoryLocation &Loc) |
| getModRefInfo (for fences) - Return information about whether a particular store modifies or reads the specified memory location. More... | |
| ModRefInfo | getModRefInfo (const FenceInst *S, const Value *P, uint64_t Size) |
| getModRefInfo (for fences) - A convenience wrapper. More... | |
| ModRefInfo | getModRefInfo (const AtomicCmpXchgInst *CX, const MemoryLocation &Loc) |
| getModRefInfo (for cmpxchges) - Return information about whether a particular cmpxchg modifies or reads the specified memory location. More... | |
| ModRefInfo | getModRefInfo (const AtomicCmpXchgInst *CX, const Value *P, unsigned Size) |
| getModRefInfo (for cmpxchges) - A convenience wrapper. More... | |
| ModRefInfo | getModRefInfo (const AtomicRMWInst *RMW, const MemoryLocation &Loc) |
| getModRefInfo (for atomicrmws) - Return information about whether a particular atomicrmw modifies or reads the specified memory location. More... | |
| ModRefInfo | getModRefInfo (const AtomicRMWInst *RMW, const Value *P, unsigned Size) |
| getModRefInfo (for atomicrmws) - A convenience wrapper. More... | |
| ModRefInfo | getModRefInfo (const VAArgInst *I, const MemoryLocation &Loc) |
| getModRefInfo (for va_args) - Return information about whether a particular va_arg modifies or reads the specified memory location. More... | |
| ModRefInfo | getModRefInfo (const VAArgInst *I, const Value *P, uint64_t Size) |
| getModRefInfo (for va_args) - A convenience wrapper. More... | |
| ModRefInfo | getModRefInfo (const CatchPadInst *I, const MemoryLocation &Loc) |
| getModRefInfo (for catchpads) - Return information about whether a particular catchpad modifies or reads the specified memory location. More... | |
| ModRefInfo | getModRefInfo (const CatchPadInst *I, const Value *P, uint64_t Size) |
| getModRefInfo (for catchpads) - A convenience wrapper. More... | |
| ModRefInfo | getModRefInfo (const CatchReturnInst *I, const MemoryLocation &Loc) |
| getModRefInfo (for catchrets) - Return information about whether a particular catchret modifies or reads the specified memory location. More... | |
| ModRefInfo | getModRefInfo (const CatchReturnInst *I, const Value *P, uint64_t Size) |
| getModRefInfo (for catchrets) - A convenience wrapper. More... | |
| ModRefInfo | getModRefInfo (const Instruction *I) |
| Check whether or not an instruction may read or write memory (without regard to a specific location). More... | |
| ModRefInfo | getModRefInfo (const Instruction *I, const MemoryLocation &Loc) |
| Check whether or not an instruction may read or write the specified memory location. More... | |
| ModRefInfo | getModRefInfo (const Instruction *I, const Value *P, uint64_t Size) |
| A convenience wrapper for constructing the memory location. More... | |
| ModRefInfo | getModRefInfo (Instruction *I, ImmutableCallSite Call) |
| Return information about whether a call and an instruction may refer to the same memory locations. More... | |
| ModRefInfo | getModRefInfo (ImmutableCallSite CS1, ImmutableCallSite CS2) |
| Return information about whether two call sites may refer to the same set of memory locations. More... | |
| ModRefInfo | callCapturesBefore (const Instruction *I, const MemoryLocation &MemLoc, DominatorTree *DT, OrderedBasicBlock *OBB=nullptr) |
Return information about whether a particular call site modifies or reads the specified memory location MemLoc before instruction I in a BasicBlock. More... | |
| ModRefInfo | callCapturesBefore (const Instruction *I, const Value *P, uint64_t Size, DominatorTree *DT, OrderedBasicBlock *OBB=nullptr) |
| A convenience wrapper to synthesize a memory location. More... | |
| static bool | onlyReadsMemory (FunctionModRefBehavior MRB) |
| Checks if functions with the specified behavior are known to only read from non-volatile memory (or not access memory at all). More... | |
| static bool | doesNotReadMemory (FunctionModRefBehavior MRB) |
| Checks if functions with the specified behavior are known to only write memory (or not access memory at all). More... | |
| static bool | onlyAccessesArgPointees (FunctionModRefBehavior MRB) |
| Checks if functions with the specified behavior are known to read and write at most from objects pointed to by their pointer-typed arguments (with arbitrary offsets). More... | |
| static bool | doesAccessArgPointees (FunctionModRefBehavior MRB) |
| Checks if functions with the specified behavior are known to potentially read or write from objects pointed to be their pointer-typed arguments (with arbitrary offsets). More... | |
| static bool | onlyAccessesInaccessibleMem (FunctionModRefBehavior MRB) |
| Checks if functions with the specified behavior are known to read and write at most from memory that is inaccessible from LLVM IR. More... | |
| static bool | doesAccessInaccessibleMem (FunctionModRefBehavior MRB) |
| Checks if functions with the specified behavior are known to potentially read or write from memory that is inaccessible from LLVM IR. More... | |
| static bool | onlyAccessesInaccessibleOrArgMem (FunctionModRefBehavior MRB) |
| Checks if functions with the specified behavior are known to read and write at most from memory that is inaccessible from LLVM IR or objects pointed to by their pointer-typed arguments (with arbitrary offsets). More... | |
Higher level methods for querying mod/ref information. | |
| template<typename T > | |
| class | AAResultBase |
| bool | canBasicBlockModify (const BasicBlock &BB, const MemoryLocation &Loc) |
| Check if it is possible for execution of the specified basic block to modify the location Loc. More... | |
| bool | canBasicBlockModify (const BasicBlock &BB, const Value *P, uint64_t Size) |
| A convenience wrapper synthesizing a memory location. More... | |
| bool | canInstructionRangeModRef (const Instruction &I1, const Instruction &I2, const MemoryLocation &Loc, const ModRefInfo Mode) |
| Check if it is possible for the execution of the specified instructions to mod(according to the mode) the location Loc. More... | |
| bool | canInstructionRangeModRef (const Instruction &I1, const Instruction &I2, const Value *Ptr, uint64_t Size, const ModRefInfo Mode) |
| A convenience wrapper synthesizing a memory location. More... | |
Definition at line 184 of file AliasAnalysis.h.
|
inline |
Definition at line 188 of file AliasAnalysis.h.
| AAResults::AAResults | ( | AAResults && | Arg | ) |
Definition at line 56 of file AliasAnalysis.cpp.
| AAResults::~AAResults | ( | ) |
Definition at line 62 of file AliasAnalysis.cpp.
|
inline |
Register a function analysis ID that the results aggregation depends on.
This is used in the new pass manager to implement the invalidation logic where we must invalidate the results aggregation if any of our component analyses become invalid.
Definition at line 205 of file AliasAnalysis.h.
|
inline |
Register a specific AA result.
Definition at line 193 of file AliasAnalysis.h.
Referenced by llvm::createLegacyPMAAResults().
| AliasResult AAResults::alias | ( | const MemoryLocation & | LocA, |
| const MemoryLocation & | LocB | ||
| ) |
The main low level interface to the alias analysis implementation.
Returns an AliasResult indicating whether the two pointers are aliased to each other. This is the interface that must be implemented by specific alias analysis implementations.
Definition at line 93 of file AliasAnalysis.cpp.
References llvm::MayAlias.
Referenced by alias(), llvm::AAResultBase< DerivedT >::AAResultsProxy::alias(), llvm::AliasSet::aliasesPointer(), llvm::SIInstrInfo::areMemAccessesTriviallyDisjoint(), getModRefInfo(), llvm::MemoryDependenceResults::getSimplePointerDependencyFrom(), isMustAlias(), isNoAlias(), llvm::AliasSet::mergeSetIn(), MIsNeedChainEdge(), operandReferences(), and underlyingObjectsAlias().
|
inline |
A convenience wrapper around the primary alias interface.
Definition at line 225 of file AliasAnalysis.h.
References alias().
|
inline |
A convenience wrapper around the primary alias interface.
Definition at line 231 of file AliasAnalysis.h.
References alias(), and llvm::MemoryLocation::UnknownSize.
| ModRefInfo AAResults::callCapturesBefore | ( | const Instruction * | I, |
| const MemoryLocation & | MemLoc, | ||
| DominatorTree * | DT, | ||
| OrderedBasicBlock * | OBB = nullptr |
||
| ) |
Return information about whether a particular call site modifies or reads the specified memory location MemLoc before instruction I in a BasicBlock.
A ordered basic block OBB can be used to speed up instruction ordering queries inside the BasicBlock containing I.
A ordered basic block OBB can be used to speed up instruction-ordering queries inside the BasicBlock containing I. FIXME: this is really just shoring-up a deficiency in alias analysis. BasicAA isn't willing to spend linear time determining whether an alloca was captured before or after this particular call, while we are. However, with a smarter AA in place, this test is just wasting compile time.
Definition at line 449 of file AliasAnalysis.cpp.
References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::data_operands_begin(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::data_operands_end(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::doesNotAccessMemory(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::doesNotCapture(), llvm::Module::getDataLayout(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::Instruction::getModule(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getNumArgOperands(), llvm::GetUnderlyingObject(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::isByValArgument(), llvm::isIdentifiedObject(), isNoAlias(), llvm::MRI_ModRef, llvm::MRI_NoModRef, llvm::MRI_Ref, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::onlyReadsMemory(), llvm::PointerMayBeCapturedBefore(), and llvm::MemoryLocation::Ptr.
Referenced by callCapturesBefore(), and llvm::MemoryDependenceResults::getSimplePointerDependencyFrom().
|
inline |
A convenience wrapper to synthesize a memory location.
Definition at line 580 of file AliasAnalysis.h.
References callCapturesBefore().
| bool AAResults::canBasicBlockModify | ( | const BasicBlock & | BB, |
| const MemoryLocation & | Loc | ||
| ) |
Check if it is possible for execution of the specified basic block to modify the location Loc.
canBasicBlockModify - Return true if it is possible for execution of the specified basic block to modify the location Loc.
Definition at line 504 of file AliasAnalysis.cpp.
References llvm::BasicBlock::back(), canInstructionRangeModRef(), llvm::BasicBlock::front(), and llvm::MRI_Mod.
Referenced by canBasicBlockModify(), and isSafeToPromoteArgument().
|
inline |
A convenience wrapper synthesizing a memory location.
Definition at line 596 of file AliasAnalysis.h.
References canBasicBlockModify().
| bool AAResults::canInstructionRangeModRef | ( | const Instruction & | I1, |
| const Instruction & | I2, | ||
| const MemoryLocation & | Loc, | ||
| const ModRefInfo | Mode | ||
| ) |
Check if it is possible for the execution of the specified instructions to mod(according to the mode) the location Loc.
canInstructionRangeModRef - Return true if it is possible for the execution of the specified instructions to mod(according to the mode) the location Loc.
The instructions to consider are all of the instructions in the range of [I1,I2] INCLUSIVE. I1 and I2 must be in the same basic block.
Definition at line 514 of file AliasAnalysis.cpp.
References assert(), E, llvm::ilist_node_impl< OptionsT >::getIterator(), getModRefInfo(), llvm::Instruction::getParent(), and I.
Referenced by canBasicBlockModify(), canInstructionRangeModRef(), and isSafeToPromoteArgument().
|
inline |
A convenience wrapper synthesizing a memory location.
Definition at line 611 of file AliasAnalysis.h.
References canInstructionRangeModRef().
|
inlinestatic |
Checks if functions with the specified behavior are known to potentially read or write from objects pointed to be their pointer-typed arguments (with arbitrary offsets).
Definition at line 370 of file AliasAnalysis.h.
References llvm::FMRL_ArgumentPointees, and llvm::MRI_ModRef.
Referenced by getModRefInfo().
|
inlinestatic |
Checks if functions with the specified behavior are known to potentially read or write from memory that is inaccessible from LLVM IR.
Definition at line 382 of file AliasAnalysis.h.
References llvm::FMRL_InaccessibleMem, and llvm::MRI_ModRef.
|
inline |
Checks if the specified call is known to never read or write memory.
Note that if the call only reads from known-constant memory, it is also legal to return true. Also, calls that unwind the stack are legal for this predicate.
Many optimizations (such as CSE and LICM) can be performed on such calls without worrying about aliasing properties, and many calls have this property (e.g. calls to 'sin' and 'cos').
This property corresponds to the GCC 'const' attribute.
Definition at line 303 of file AliasAnalysis.h.
References llvm::FMRB_DoesNotAccessMemory, and getModRefBehavior().
Referenced by handleEndBlock().
Checks if the specified function is known to never read or write memory.
Note that if the function only reads from known-constant memory, it is also legal to return true. Also, function that unwind the stack are legal for this predicate.
Many optimizations (such as CSE and LICM) can be performed on such calls to such functions without worrying about aliasing properties, and many functions have this property (e.g. 'sin' and 'cos').
This property corresponds to the GCC 'const' attribute.
Definition at line 318 of file AliasAnalysis.h.
References llvm::FMRB_DoesNotAccessMemory, and getModRefBehavior().
|
inlinestatic |
Checks if functions with the specified behavior are known to only write memory (or not access memory at all).
Definition at line 356 of file AliasAnalysis.h.
References llvm::MRI_Ref.
Referenced by getModRefInfo().
| ModRefInfo AAResults::getArgModRefInfo | ( | ImmutableCallSite | CS, |
| unsigned | ArgIdx | ||
| ) |
Get the ModRef info associated with a pointer argument of a callsite.
The result's bits are set to indicate the allowed aliasing ModRef kinds. Note that these bits do not necessarily account for the overall behavior of the function, but rather only provide additional per-argument information.
Definition at line 112 of file AliasAnalysis.cpp.
References llvm::MRI_ModRef, and llvm::MRI_NoModRef.
Referenced by llvm::AAResultBase< DerivedT >::AAResultsProxy::getArgModRefInfo(), and getModRefInfo().
| FunctionModRefBehavior AAResults::getModRefBehavior | ( | ImmutableCallSite | CS | ) |
Return the behavior of the given call site.
Definition at line 301 of file AliasAnalysis.cpp.
References llvm::FMRB_DoesNotAccessMemory, and llvm::FMRB_UnknownModRefBehavior.
Referenced by AddAliasScopeMetadata(), llvm::objcarc::CanAlterRefCount(), llvm::canSinkOrHoistInst(), checkFunctionMemoryAccess(), doesNotAccessMemory(), llvm::AAResultBase< DerivedT >::AAResultsProxy::getModRefBehavior(), getModRefInfo(), and onlyReadsMemory().
| FunctionModRefBehavior AAResults::getModRefBehavior | ( | const Function * | F | ) |
Return the behavior when calling the given function.
Definition at line 315 of file AliasAnalysis.cpp.
References llvm::FMRB_DoesNotAccessMemory, and llvm::FMRB_UnknownModRefBehavior.
| ModRefInfo AAResults::getModRefInfo | ( | ImmutableCallSite | CS, |
| const MemoryLocation & | Loc | ||
| ) |
getModRefInfo (for call sites) - Return information about whether a particular call site modifies or reads the specified memory location.
Definition at line 146 of file AliasAnalysis.cpp.
References alias(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_begin(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_end(), doesAccessArgPointees(), doesNotReadMemory(), llvm::FMRB_DoesNotAccessMemory, llvm::FMRB_OnlyAccessesInaccessibleMem, getArgModRefInfo(), llvm::MemoryLocation::getForArgument(), getModRefBehavior(), llvm::Value::getType(), llvm::Type::isPointerTy(), llvm::MRI_Mod, llvm::MRI_ModRef, llvm::MRI_NoModRef, llvm::MRI_Ref, llvm::NoAlias, onlyAccessesArgPointees(), onlyAccessesInaccessibleOrArgMem(), onlyReadsMemory(), and pointsToConstantMemory().
Referenced by llvm::AliasSet::aliasesPointer(), llvm::AliasSet::aliasesUnknownInst(), canInstructionRangeModRef(), eliminateDeadStores(), llvm::FindAvailableLoadedValue(), findSafeStoreForStoreStrongContraction(), getModRefInfo(), llvm::AAResultBase< DerivedT >::AAResultsProxy::getModRefInfo(), llvm::MemoryDependenceResults::getSimplePointerDependencyFrom(), handleEndBlock(), llvm::instructionClobbersQuery(), isSafeToMove(), mayLoopAccessLocation(), memoryIsNotModifiedBetween(), and moveUp().
|
inline |
getModRefInfo (for call sites) - A convenience wrapper.
Definition at line 399 of file AliasAnalysis.h.
References getModRefInfo().
|
inline |
getModRefInfo (for calls) - Return information about whether a particular call modifies or reads the specified memory location.
Definition at line 406 of file AliasAnalysis.h.
References getModRefInfo().
|
inline |
getModRefInfo (for calls) - A convenience wrapper.
Definition at line 411 of file AliasAnalysis.h.
References getModRefInfo().
|
inline |
getModRefInfo (for invokes) - Return information about whether a particular invoke modifies or reads the specified memory location.
Definition at line 417 of file AliasAnalysis.h.
References getModRefInfo().
|
inline |
getModRefInfo (for invokes) - A convenience wrapper.
Definition at line 422 of file AliasAnalysis.h.
References getModRefInfo().
| ModRefInfo AAResults::getModRefInfo | ( | const LoadInst * | L, |
| const MemoryLocation & | Loc | ||
| ) |
getModRefInfo (for loads) - Return information about whether a particular load modifies or reads the specified memory location.
Definition at line 333 of file AliasAnalysis.cpp.
References alias(), llvm::MemoryLocation::get(), llvm::LoadInst::isUnordered(), llvm::MRI_ModRef, llvm::MRI_NoModRef, llvm::MRI_Ref, and llvm::MemoryLocation::Ptr.
|
inline |
getModRefInfo (for loads) - A convenience wrapper.
Definition at line 431 of file AliasAnalysis.h.
References getModRefInfo().
| ModRefInfo AAResults::getModRefInfo | ( | const StoreInst * | S, |
| const MemoryLocation & | Loc | ||
| ) |
getModRefInfo (for stores) - Return information about whether a particular store modifies or reads the specified memory location.
Definition at line 348 of file AliasAnalysis.cpp.
References alias(), llvm::MemoryLocation::get(), llvm::StoreInst::isUnordered(), llvm::MRI_Mod, llvm::MRI_ModRef, llvm::MRI_NoModRef, pointsToConstantMemory(), and llvm::MemoryLocation::Ptr.
|
inline |
getModRefInfo (for stores) - A convenience wrapper.
Definition at line 440 of file AliasAnalysis.h.
References getModRefInfo().
|
inline |
getModRefInfo (for fences) - Return information about whether a particular store modifies or reads the specified memory location.
Definition at line 446 of file AliasAnalysis.h.
References llvm::MRI_ModRef.
|
inline |
getModRefInfo (for fences) - A convenience wrapper.
Definition at line 453 of file AliasAnalysis.h.
References getModRefInfo().
| ModRefInfo AAResults::getModRefInfo | ( | const AtomicCmpXchgInst * | CX, |
| const MemoryLocation & | Loc | ||
| ) |
getModRefInfo (for cmpxchges) - Return information about whether a particular cmpxchg modifies or reads the specified memory location.
Definition at line 415 of file AliasAnalysis.cpp.
References alias(), llvm::MemoryLocation::get(), llvm::AtomicCmpXchgInst::getSuccessOrdering(), llvm::isStrongerThanMonotonic(), llvm::MRI_ModRef, llvm::MRI_NoModRef, and llvm::MemoryLocation::Ptr.
|
inline |
getModRefInfo (for cmpxchges) - A convenience wrapper.
Definition at line 463 of file AliasAnalysis.h.
References getModRefInfo().
| ModRefInfo AAResults::getModRefInfo | ( | const AtomicRMWInst * | RMW, |
| const MemoryLocation & | Loc | ||
| ) |
getModRefInfo (for atomicrmws) - Return information about whether a particular atomicrmw modifies or reads the specified memory location.
Definition at line 428 of file AliasAnalysis.cpp.
References alias(), llvm::MemoryLocation::get(), llvm::AtomicRMWInst::getOrdering(), llvm::isStrongerThanMonotonic(), llvm::MRI_ModRef, llvm::MRI_NoModRef, and llvm::MemoryLocation::Ptr.
|
inline |
getModRefInfo (for atomicrmws) - A convenience wrapper.
Definition at line 473 of file AliasAnalysis.h.
References getModRefInfo().
| ModRefInfo AAResults::getModRefInfo | ( | const VAArgInst * | I, |
| const MemoryLocation & | Loc | ||
| ) |
getModRefInfo (for va_args) - Return information about whether a particular va_arg modifies or reads the specified memory location.
Definition at line 370 of file AliasAnalysis.cpp.
References alias(), llvm::MemoryLocation::get(), llvm::MRI_ModRef, llvm::MRI_NoModRef, pointsToConstantMemory(), and llvm::MemoryLocation::Ptr.
|
inline |
getModRefInfo (for va_args) - A convenience wrapper.
Definition at line 483 of file AliasAnalysis.h.
References getModRefInfo().
| ModRefInfo AAResults::getModRefInfo | ( | const CatchPadInst * | I, |
| const MemoryLocation & | Loc | ||
| ) |
getModRefInfo (for catchpads) - Return information about whether a particular catchpad modifies or reads the specified memory location.
Definition at line 389 of file AliasAnalysis.cpp.
References llvm::MRI_ModRef, llvm::MRI_NoModRef, pointsToConstantMemory(), and llvm::MemoryLocation::Ptr.
|
inline |
getModRefInfo (for catchpads) - A convenience wrapper.
Definition at line 492 of file AliasAnalysis.h.
References getModRefInfo().
| ModRefInfo AAResults::getModRefInfo | ( | const CatchReturnInst * | I, |
| const MemoryLocation & | Loc | ||
| ) |
getModRefInfo (for catchrets) - Return information about whether a particular catchret modifies or reads the specified memory location.
Definition at line 402 of file AliasAnalysis.cpp.
References llvm::MRI_ModRef, llvm::MRI_NoModRef, pointsToConstantMemory(), and llvm::MemoryLocation::Ptr.
|
inline |
getModRefInfo (for catchrets) - A convenience wrapper.
Definition at line 502 of file AliasAnalysis.h.
References getModRefInfo().
|
inline |
Check whether or not an instruction may read or write memory (without regard to a specific location).
For function calls, this delegates to the alias-analysis specific call-site mod-ref behavior queries. Otherwise it delegates to the generic mod ref information query without a location.
Definition at line 513 of file AliasAnalysis.h.
References getModRefBehavior(), getModRefInfo(), llvm::MRI_Mod, llvm::MRI_ModRef, llvm::MRI_NoModRef, and llvm::MRI_Ref.
|
inline |
Check whether or not an instruction may read or write the specified memory location.
An instruction that doesn't read or write memory may be trivially LICM'd for example.
This primarily delegates to specific helpers above.
Definition at line 535 of file AliasAnalysis.h.
References llvm::Call, getModRefInfo(), llvm::Instruction::getOpcode(), llvm::SPII::Load, llvm::MRI_NoModRef, and llvm::SPII::Store.
|
inline |
A convenience wrapper for constructing the memory location.
Definition at line 557 of file AliasAnalysis.h.
References getModRefInfo().
| ModRefInfo AAResults::getModRefInfo | ( | Instruction * | I, |
| ImmutableCallSite | Call | ||
| ) |
Return information about whether a call and an instruction may refer to the same memory locations.
Definition at line 126 of file AliasAnalysis.cpp.
References llvm::MemoryLocation::get(), getModRefInfo(), llvm::Instruction::isFenceLike(), llvm::MRI_ModRef, and llvm::MRI_NoModRef.
| ModRefInfo AAResults::getModRefInfo | ( | ImmutableCallSite | CS1, |
| ImmutableCallSite | CS2 | ||
| ) |
Return information about whether two call sites may refer to the same set of memory locations.
See the AA documentation for details: http://llvm.org/docs/AliasAnalysis.html#ModRefInfo
Definition at line 202 of file AliasAnalysis.cpp.
References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_begin(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::arg_end(), doesAccessArgPointees(), doesNotReadMemory(), E, llvm::FMRB_DoesNotAccessMemory, getArgModRefInfo(), llvm::MemoryLocation::getForArgument(), getModRefBehavior(), getModRefInfo(), llvm::Value::getType(), I, llvm::Type::isPointerTy(), llvm::MRI_Mod, llvm::MRI_ModRef, llvm::MRI_NoModRef, llvm::MRI_Ref, onlyAccessesArgPointees(), and onlyReadsMemory().
| bool AAResults::invalidate | ( | Function & | F, |
| const PreservedAnalyses & | PA, | ||
| FunctionAnalysisManager::Invalidator & | Inv | ||
| ) |
Handle invalidation events in the new pass manager.
The aggregation is invalidated if any of the underlying analyses is invalidated.
Definition at line 73 of file AliasAnalysis.cpp.
References llvm::PreservedAnalyses::getChecker(), and llvm::AnalysisManager< IRUnitT, ExtraArgTs >::Invalidator::invalidate().
|
inline |
A trivial helper function to check to see if the specified pointers are must-alias.
Definition at line 255 of file AliasAnalysis.h.
References alias(), and llvm::MustAlias.
Referenced by llvm::MemoryDependenceResults::getSimplePointerDependencyFrom(), handleFree(), and isPossibleSelfRead().
A convenience wrapper around the isMustAlias helper interface.
Definition at line 260 of file AliasAnalysis.h.
References alias(), and llvm::MustAlias.
|
inline |
A trivial helper function to check to see if the specified pointers are no-alias.
Definition at line 238 of file AliasAnalysis.h.
References alias(), and llvm::NoAlias.
Referenced by callCapturesBefore(), llvm::instructionClobbersQuery(), isNoAlias(), isPossibleSelfRead(), and removeAccessedObjects().
|
inline |
A convenience wrapper around the isNoAlias helper interface.
Definition at line 243 of file AliasAnalysis.h.
References isNoAlias().
A convenience wrapper around the isNoAlias helper interface.
Definition at line 249 of file AliasAnalysis.h.
References isNoAlias().
|
inlinestatic |
Checks if functions with the specified behavior are known to read and write at most from objects pointed to by their pointer-typed arguments (with arbitrary offsets).
Definition at line 363 of file AliasAnalysis.h.
References llvm::FMRL_Anywhere, and llvm::FMRL_ArgumentPointees.
Referenced by llvm::objcarc::CanAlterRefCount(), llvm::canSinkOrHoistInst(), checkFunctionMemoryAccess(), and getModRefInfo().
|
inlinestatic |
Checks if functions with the specified behavior are known to read and write at most from memory that is inaccessible from LLVM IR.
Definition at line 376 of file AliasAnalysis.h.
References llvm::FMRL_Anywhere, and llvm::FMRL_InaccessibleMem.
|
inlinestatic |
Checks if functions with the specified behavior are known to read and write at most from memory that is inaccessible from LLVM IR or objects pointed to by their pointer-typed arguments (with arbitrary offsets).
Definition at line 389 of file AliasAnalysis.h.
References llvm::FMRL_Anywhere, llvm::FMRL_ArgumentPointees, and llvm::FMRL_InaccessibleMem.
Referenced by getModRefInfo().
|
inline |
Checks if the specified call is known to only read from non-volatile memory (or not access memory at all).
Calls that unwind the stack are legal for this predicate.
This property allows many common optimizations to be performed in the absence of interfering store instructions, such as CSE of strlen calls.
This property corresponds to the GCC 'pure' attribute.
Definition at line 331 of file AliasAnalysis.h.
References getModRefBehavior().
Referenced by llvm::objcarc::CanAlterRefCount(), llvm::canSinkOrHoistInst(), checkFunctionMemoryAccess(), llvm::MemoryDependenceResults::getDependency(), getModRefInfo(), llvm::MemoryDependenceResults::getNonLocalCallDependency(), and onlyReadsMemory().
Checks if the specified function is known to only read from non-volatile memory (or not access memory at all).
Functions that unwind the stack are legal for this predicate.
This property allows many common optimizations to be performed in the absence of interfering store instructions, such as CSE of strlen calls.
This property corresponds to the GCC 'pure' attribute.
Definition at line 344 of file AliasAnalysis.h.
References getModRefBehavior(), and onlyReadsMemory().
|
inlinestatic |
Checks if functions with the specified behavior are known to only read from non-volatile memory (or not access memory at all).
Definition at line 350 of file AliasAnalysis.h.
References llvm::MRI_Mod.
| bool AAResults::pointsToConstantMemory | ( | const MemoryLocation & | Loc, |
| bool | OrLocal = false |
||
| ) |
Checks whether the given location points to constant memory, or if OrLocal is true whether it points to a local alloca.
Definition at line 103 of file AliasAnalysis.cpp.
Referenced by llvm::canSinkOrHoistInst(), checkFunctionMemoryAccess(), getMemCmpLoad(), getModRefInfo(), llvm::MemoryDependenceResults::getSimplePointerDependencyFrom(), llvm::MachineInstr::isDereferenceableInvariantLoad(), llvm::objcarc::IsPotentialRetainableObjPtr(), pointsToConstantMemory(), and llvm::AAResultBase< DerivedT >::AAResultsProxy::pointsToConstantMemory().
A convenience wrapper around the primary pointsToConstantMemory interface.
Definition at line 270 of file AliasAnalysis.h.
References pointsToConstantMemory().
|
friend |
Definition at line 619 of file AliasAnalysis.h.
1.8.6