|
LLVM
4.0.0
|
This is the AA result object for the basic, local, and stateless alias analysis. More...
#include <BasicAliasAnalysis.h>
Additional Inherited Members | |
Protected Member Functions inherited from llvm::AAResultBase< DerivedT > | |
| AAResultBase () | |
| AAResultBase (const AAResultBase &Arg) | |
| AAResultBase (AAResultBase &&Arg) | |
| AAResultsProxy | getBestAAResults () |
| Get a proxy for the best AA result set to query at this time. More... | |
This is the AA result object for the basic, local, and stateless alias analysis.
It implements the AA query interface in an entirely stateless manner. As one consequence, it is never invalidated due to IR changes. While it does retain some storage, that is used as an optimization and not to preserve information from query to query. However it does retain handles to various other analyses and must be recomputed when those analyses are.
Definition at line 40 of file BasicAliasAnalysis.h.
|
inline |
Definition at line 50 of file BasicAliasAnalysis.h.
Referenced by llvm::BasicAA::run().
|
inline |
Definition at line 55 of file BasicAliasAnalysis.h.
|
inline |
Definition at line 58 of file BasicAliasAnalysis.h.
| AliasResult BasicAAResult::alias | ( | const MemoryLocation & | LocA, |
| const MemoryLocation & | LocB | ||
| ) |
Definition at line 701 of file BasicAliasAnalysis.cpp.
References llvm::MemoryLocation::AATags, assert(), llvm::SmallPtrSetImplBase::clear(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), notDifferentParent(), llvm::MemoryLocation::Ptr, llvm::SmallDenseMap< KeyT, ValueT, InlineBuckets, KeyInfoT, BucketT >::shrink_and_clear(), and llvm::MemoryLocation::Size.
Referenced by getModRefInfo().
| ModRefInfo BasicAAResult::getArgModRefInfo | ( | ImmutableCallSite | CS, |
| unsigned | ArgIdx | ||
| ) |
Get the location associated with a pointer argument of a callsite.
Definition at line 660 of file BasicAliasAnalysis.cpp.
References llvm::AAResultBase< DerivedT >::getArgModRefInfo(), isWriteOnlyParam(), llvm::MRI_Mod, llvm::MRI_NoModRef, llvm::MRI_Ref, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::paramHasAttr(), and AMDGPU::RuntimeMD::KernelArg::ReadOnly.
| FunctionModRefBehavior BasicAAResult::getModRefBehavior | ( | ImmutableCallSite | CS | ) |
Returns the behavior when calling the given call site.
Definition at line 582 of file BasicAliasAnalysis.cpp.
References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::doesNotAccessMemory(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::doesNotReadMemory(), F, llvm::FMRB_DoesNotAccessMemory, llvm::FMRB_DoesNotReadMemory, llvm::FMRB_OnlyAccessesArgumentPointees, llvm::FMRB_OnlyReadsMemory, llvm::FMRB_UnknownModRefBehavior, llvm::AAResultBase< DerivedT >::getBestAAResults(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), llvm::AAResultBase< DerivedT >::AAResultsProxy::getModRefBehavior(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::hasOperandBundles(), llvm::Min, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::onlyAccessesArgMemory(), and llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::onlyReadsMemory().
Referenced by getModRefInfo().
| FunctionModRefBehavior BasicAAResult::getModRefBehavior | ( | const Function * | F | ) |
Returns the behavior when calling the given function.
For use when the call site is not known.
Definition at line 612 of file BasicAliasAnalysis.cpp.
References llvm::Function::doesNotAccessMemory(), llvm::Function::doesNotReadMemory(), llvm::FMRB_DoesNotAccessMemory, llvm::FMRB_DoesNotReadMemory, llvm::FMRB_OnlyAccessesArgumentPointees, llvm::FMRB_OnlyAccessesInaccessibleMem, llvm::FMRB_OnlyAccessesInaccessibleOrArgMem, llvm::FMRB_OnlyReadsMemory, llvm::FMRB_UnknownModRefBehavior, llvm::Min, llvm::Function::onlyAccessesArgMemory(), llvm::Function::onlyAccessesInaccessibleMemOrArgMem(), llvm::Function::onlyAccessesInaccessibleMemory(), and llvm::Function::onlyReadsMemory().
| ModRefInfo BasicAAResult::getModRefInfo | ( | ImmutableCallSite | CS, |
| const MemoryLocation & | Loc | ||
| ) |
Checks to see if the specified callsite can clobber the specified memory object.
Since we only look at local properties of this function, we really can't say much about this query. We do, however, use simple "address taken" analysis on local objects.
Definition at line 730 of file BasicAliasAnalysis.cpp.
References alias(), llvm::AAResultBase< DerivedT >::AAResultsProxy::alias(), assert(), 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 >::doesNotCapture(), llvm::AAResultBase< DerivedT >::getBestAAResults(), llvm::MemoryLocation::getForDest(), llvm::MemoryLocation::getForSource(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getInstruction(), llvm::AAResultBase< DerivedT >::getModRefInfo(), 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::isCallocLikeFn(), isIntrinsicCall(), llvm::isMallocLikeFn(), isNonEscapingLocalObject(), llvm::MRI_Mod, llvm::MRI_NoModRef, llvm::MRI_Ref, llvm::MustAlias, llvm::NoAlias, notDifferentParent(), and llvm::MemoryLocation::Ptr.
| ModRefInfo BasicAAResult::getModRefInfo | ( | ImmutableCallSite | CS1, |
| ImmutableCallSite | CS2 | ||
| ) |
Definition at line 865 of file BasicAliasAnalysis.cpp.
References getModRefBehavior(), llvm::AAResultBase< DerivedT >::getModRefInfo(), isIntrinsicCall(), llvm::MRI_Mod, llvm::MRI_NoModRef, and llvm::MRI_Ref.
| bool BasicAAResult::invalidate | ( | Function & | F, |
| const PreservedAnalyses & | PA, | ||
| FunctionAnalysisManager::Invalidator & | Inv | ||
| ) |
Handle invalidation events in the new pass manager.
Definition at line 66 of file BasicAliasAnalysis.cpp.
References llvm::AnalysisManager< IRUnitT, ExtraArgTs >::Invalidator::invalidate().
| bool BasicAAResult::pointsToConstantMemory | ( | const MemoryLocation & | Loc, |
| bool | OrLocal | ||
| ) |
Chases pointers until we find a (constant global) or not.
Returns whether the given pointer value points to memory that is local to the function, with global constants being considered local to all functions.
Definition at line 521 of file BasicAliasAnalysis.cpp.
References assert(), llvm::SmallVectorBase::empty(), llvm::GetUnderlyingObject(), llvm::AAResultBase< DerivedT >::pointsToConstantMemory(), llvm::SmallVectorImpl< T >::pop_back_val(), llvm::MemoryLocation::Ptr, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), and SI.
1.8.6