|
LLVM 23.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 | |
| Protected Member Functions inherited from llvm::AAResultBase | |
| AAResultBase ()=default | |
| AAResultBase (const AAResultBase &Arg)=default | |
| AAResultBase (AAResultBase &&Arg) | |
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 42 of file BasicAliasAnalysis.h.
|
inline |
Definition at line 56 of file BasicAliasAnalysis.h.
Referenced by BasicAAResult(), and BasicAAResult().
|
inline |
Definition at line 61 of file BasicAliasAnalysis.h.
References llvm::AAResultBase::AAResultBase(), and BasicAAResult().
|
inline |
Definition at line 64 of file BasicAliasAnalysis.h.
References llvm::AAResultBase::AAResultBase(), BasicAAResult(), and llvm::move().
| AliasResult BasicAAResult::alias | ( | const MemoryLocation & | LocA, |
| const MemoryLocation & | LocB, | ||
| AAQueryInfo & | AAQI, | ||
| const Instruction * | CtxI ) |
Definition at line 912 of file BasicAliasAnalysis.cpp.
References assert(), notDifferentParent(), llvm::MemoryLocation::Ptr, and llvm::MemoryLocation::Size.
| AliasResult BasicAAResult::aliasErrno | ( | const MemoryLocation & | Loc, |
| const Module * | M ) |
Definition at line 1882 of file BasicAliasAnalysis.cpp.
References llvm::getUnderlyingObject(), llvm::isIdentifiedFunctionLocal(), llvm::AliasResult::MayAlias, and llvm::AliasResult::NoAlias.
| ModRefInfo BasicAAResult::getArgModRefInfo | ( | const CallBase * | Call, |
| unsigned | ArgIdx ) |
Get the location associated with a pointer argument of a callsite.
Definition at line 875 of file BasicAliasAnalysis.cpp.
References Call, llvm::Mod, llvm::ModRef, llvm::NoModRef, and llvm::Ref.
| MemoryEffects BasicAAResult::getMemoryEffects | ( | const CallBase * | Call, |
| AAQueryInfo & | AAQI ) |
Returns the behavior when calling the given call site.
Definition at line 838 of file BasicAliasAnalysis.cpp.
References llvm::AAQueryInfo::AAR, Call, llvm::dyn_cast(), llvm::AAResults::getMemoryEffects(), llvm::MemoryEffectsBase< IRMemLocation >::inaccessibleMemOnly(), llvm::MemoryEffectsBase< IRMemLocation >::readOnly(), and llvm::MemoryEffectsBase< IRMemLocation >::writeOnly().
Referenced by getModRefInfo().
| MemoryEffects BasicAAResult::getMemoryEffects | ( | const Function * | F | ) |
Returns the behavior when calling the given function.
For use when the call site is not known.
Definition at line 862 of file BasicAliasAnalysis.cpp.
References llvm::MemoryEffectsBase< IRMemLocation >::inaccessibleMemOnly(), llvm::ModRef, and llvm::MemoryEffectsBase< IRMemLocation >::readOnly().
| 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 926 of file BasicAliasAnalysis.cpp.
References llvm::AAQueryInfo::AAR, llvm::AAResults::alias(), llvm::AAResults::aliasErrno(), llvm::ArgMem, assert(), llvm::AAQueryInfo::CA, Call, llvm::capturesNothing(), llvm::capturesReadProvenanceOnly(), llvm::dyn_cast(), llvm::ErrnoMem, llvm::AAResults::getArgModRefInfo(), llvm::MemoryLocation::getBeforeOrAfter(), llvm::CaptureAnalysis::getCapturesBefore(), llvm::MemoryLocation::getForArgument(), llvm::AAResults::getMemoryEffects(), llvm::Value::getType(), llvm::getUnderlyingObject(), llvm::MemoryEffectsBase< LocationEnum >::getWithoutLoc(), llvm::InaccessibleMem, llvm::isa(), isIntrinsicCall(), llvm::isMallocOrCallocLikeFn(), llvm::isModAndRefSet(), llvm::isModOrRefSet(), llvm::Type::isPointerTy(), llvm::Mod, llvm::ModRef, llvm::AliasResult::NoAlias, llvm::NoModRef, notDifferentParent(), llvm::Other, and llvm::Ref.
| ModRefInfo BasicAAResult::getModRefInfo | ( | const CallBase * | Call1, |
| const CallBase * | Call2, | ||
| AAQueryInfo & | AAQI ) |
Definition at line 1062 of file BasicAliasAnalysis.cpp.
References getMemoryEffects(), isIntrinsicCall(), llvm::isModSet(), llvm::Mod, llvm::ModRef, llvm::NoModRef, and llvm::Ref.
| ModRefInfo BasicAAResult::getModRefInfoMask | ( | const MemoryLocation & | Loc, |
| AAQueryInfo & | AAQI, | ||
| bool | IgnoreLocals = false ) |
Returns a bitmask that should be unconditionally applied to the ModRef info of a memory location.
This allows us to eliminate Mod and/or Ref from the ModRef info based on the knowledge that the memory location points to constant and/or locally-invariant memory.
If IgnoreLocals is true, then this method returns NoModRef for memory that points to a local alloca.
Definition at line 761 of file BasicAliasAnalysis.cpp.
References _, llvm::append_range(), assert(), llvm::dyn_cast(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), llvm::getUnderlyingObject(), llvm::isa(), llvm::ModRef, llvm::NoModRef, llvm::SmallVectorImpl< T >::pop_back_val(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), 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 83 of file BasicAliasAnalysis.cpp.