LLVM
15.0.0git
|
This is the AA result object for the basic, local, and stateless alias analysis. More...
#include "llvm/Analysis/BasicAliasAnalysis.h"
Classes | |
struct | DecomposedGEP |
Additional Inherited Members | |
![]() | |
AAResultBase ()=default | |
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 44 of file BasicAliasAnalysis.h.
|
inline |
Definition at line 55 of file BasicAliasAnalysis.h.
|
inline |
Definition at line 60 of file BasicAliasAnalysis.h.
|
inline |
Definition at line 63 of file BasicAliasAnalysis.h.
AliasResult BasicAAResult::alias | ( | const MemoryLocation & | LocA, |
const MemoryLocation & | LocB, | ||
AAQueryInfo & | AAQI | ||
) |
Definition at line 867 of file BasicAliasAnalysis.cpp.
References assert(), notDifferentParent(), llvm::MemoryLocation::Ptr, and llvm::MemoryLocation::Size.
Referenced by getModRefInfo().
ModRefInfo BasicAAResult::getArgModRefInfo | ( | const CallBase * | Call, |
unsigned | ArgIdx | ||
) |
Get the location associated with a pointer argument of a callsite.
Definition at line 829 of file BasicAliasAnalysis.cpp.
References llvm::AAResultBase< DerivedT >::getArgModRefInfo(), isWriteOnlyParam(), llvm::Mod, llvm::NoModRef, and llvm::Ref.
FunctionModRefBehavior BasicAAResult::getModRefBehavior | ( | const CallBase * | Call | ) |
Returns the behavior when calling the given call site.
Definition at line 746 of file BasicAliasAnalysis.cpp.
References llvm::FMRB_DoesNotAccessMemory, llvm::FMRB_OnlyAccessesArgumentPointees, llvm::FMRB_OnlyAccessesInaccessibleMem, llvm::FMRB_OnlyAccessesInaccessibleOrArgMem, llvm::FMRB_OnlyReadsMemory, llvm::FMRB_OnlyWritesMemory, llvm::FMRB_UnknownModRefBehavior, and llvm::AAResultBase< BasicAAResult >::getBestAAResults().
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 780 of file BasicAliasAnalysis.cpp.
References F, llvm::FMRB_DoesNotAccessMemory, llvm::FMRB_OnlyAccessesArgumentPointees, llvm::FMRB_OnlyAccessesInaccessibleMem, llvm::FMRB_OnlyAccessesInaccessibleOrArgMem, llvm::FMRB_OnlyReadsMemory, llvm::FMRB_OnlyWritesMemory, and llvm::FMRB_UnknownModRefBehavior.
ModRefInfo BasicAAResult::getModRefInfo | ( | const CallBase * | Call, |
const MemoryLocation & | Loc, | ||
AAQueryInfo & | AAQI | ||
) |
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 881 of file BasicAliasAnalysis.cpp.
References alias(), assert(), llvm::AAQueryInfo::CI, llvm::clearMust(), llvm::MemoryLocation::getBeforeOrAfter(), llvm::AAResultBase< BasicAAResult >::getBestAAResults(), llvm::MemoryLocation::getForDest(), llvm::MemoryLocation::getForSource(), llvm::AAResultBase< DerivedT >::getModRefInfo(), llvm::getUnderlyingObject(), isIntrinsicCall(), llvm::isMallocOrCallocLikeFn(), llvm::isModAndRefSet(), llvm::isNoModRef(), llvm::CaptureInfo::isNotCapturedBeforeOrAt(), llvm::Mod, llvm::ModRef, llvm::AliasResult::MustAlias, llvm::AliasResult::NoAlias, llvm::NoModRef, notDifferentParent(), llvm::Object, llvm::MemoryLocation::Ptr, llvm::Ref, llvm::setMod(), llvm::setMust(), and llvm::setRef().
ModRefInfo BasicAAResult::getModRefInfo | ( | const CallBase * | Call1, |
const CallBase * | Call2, | ||
AAQueryInfo & | AAQI | ||
) |
Definition at line 1051 of file BasicAliasAnalysis.cpp.
References llvm::createModRefInfo(), getModRefBehavior(), llvm::AAResultBase< DerivedT >::getModRefInfo(), isIntrinsicCall(), llvm::isModSet(), llvm::Mod, llvm::NoModRef, and llvm::Ref.
bool BasicAAResult::invalidate | ( | Function & | Fn, |
const PreservedAnalyses & | PA, | ||
FunctionAnalysisManager::Invalidator & | Inv | ||
) |
Handle invalidation events in the new pass manager.
Definition at line 87 of file BasicAliasAnalysis.cpp.
References llvm::AnalysisManager< IRUnitT, ExtraArgTs >::Invalidator::invalidate().
bool BasicAAResult::pointsToConstantMemory | ( | const MemoryLocation & | Loc, |
AAQueryInfo & | AAQI, | ||
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 682 of file BasicAliasAnalysis.cpp.
References llvm::append_range(), assert(), llvm::getUnderlyingObject(), llvm::AAResultBase< DerivedT >::pointsToConstantMemory(), llvm::SmallVectorImpl< T >::pop_back_val(), llvm::MemoryLocation::Ptr, and SI.