LLVM
8.0.1
|
An alias analysis result set for globals. More...
#include "llvm/Analysis/GlobalsModRef.h"
Classes | |
class | FunctionInfo |
The mod/ref information collected for a particular function. More... | |
Static Public Member Functions | |
static GlobalsAAResult | analyzeModule (Module &M, const TargetLibraryInfo &TLI, CallGraph &CG) |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::AAResultBase< GlobalsAAResult > | |
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... | |
An alias analysis result set for globals.
This focuses on handling aliasing properties of globals and interprocedural function call mod/ref information.
Definition at line 32 of file GlobalsModRef.h.
GlobalsAAResult::GlobalsAAResult | ( | GlobalsAAResult && | Arg | ) |
Definition at line 941 of file GlobalsModRef.cpp.
GlobalsAAResult::~GlobalsAAResult | ( | ) |
Definition at line 955 of file GlobalsModRef.cpp.
AliasResult GlobalsAAResult::alias | ( | const MemoryLocation & | LocA, |
const MemoryLocation & | LocB | ||
) |
alias - If one of the pointers is to a global that we are tracking, and the other is some random pointer, we know there cannot be an alias, because the address of the global isn't taken.
Definition at line 809 of file GlobalsModRef.cpp.
References llvm::AAResultBase< DerivedT >::alias(), llvm::all_of(), llvm::CallBase::args(), llvm::CallBase::doesNotAccessMemory(), llvm::dyn_cast(), EnableUnsafeGlobalsModRefAliasResults, llvm::GetUnderlyingObject(), llvm::GetUnderlyingObjects(), llvm::is_contained(), llvm::isIdentifiedObject(), llvm::ModRef, llvm::NoAlias, llvm::NoModRef, llvm::CallBase::onlyReadsMemory(), llvm::MemoryLocation::Ptr, and llvm::Ref.
|
static |
Definition at line 958 of file GlobalsModRef.cpp.
References llvm::Module::getDataLayout().
Referenced by llvm::GlobalsAA::run(), and llvm::GlobalsAAWrapperPass::runOnModule().
FunctionModRefBehavior GlobalsAAResult::getModRefBehavior | ( | const Function * | F | ) |
getModRefBehavior - Return the behavior of the specified function if called from the specified call site.
The call site may be null in which case the most generic behavior of this function should be returned.
Definition at line 244 of file GlobalsModRef.cpp.
References llvm::FMRB_DoesNotAccessMemory, llvm::FMRB_OnlyReadsMemory, llvm::FMRB_UnknownModRefBehavior, llvm::AAResultBase< DerivedT >::getModRefBehavior(), llvm::isModOrRefSet(), and llvm::isModSet().
FunctionModRefBehavior GlobalsAAResult::getModRefBehavior | ( | const CallBase * | Call | ) |
getModRefBehavior - Return the behavior of the specified function if called from the specified call site.
The call site may be null in which case the most generic behavior of this function should be returned.
Definition at line 258 of file GlobalsModRef.cpp.
References assert(), C, llvm::SmallPtrSetImplBase::clear(), F(), llvm::FMRB_DoesNotAccessMemory, llvm::FMRB_OnlyReadsMemory, llvm::FMRB_UnknownModRefBehavior, llvm::CallBase::getCalledFunction(), llvm::Module::getDataLayout(), llvm::Function::getFunction(), llvm::GlobalVariable::getInitializer(), llvm::AAResultBase< DerivedT >::getModRefBehavior(), llvm::Operator::getOpcode(), llvm::GlobalValue::getParent(), llvm::Value::getType(), llvm::GetUnderlyingObject(), llvm::GlobalValue::hasLocalLinkage(), llvm::CallBase::hasOperandBundles(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::isAllocLikeFn(), llvm::isFreeCall(), llvm::isModOrRefSet(), llvm::isModSet(), llvm::Type::isPointerTy(), llvm::Mod, llvm::Ref, llvm::scc_begin(), SI, llvm::Value::users(), and llvm::Value::uses().
ModRefInfo GlobalsAAResult::getModRefInfo | ( | const CallBase * | Call, |
const MemoryLocation & | Loc | ||
) |
Definition at line 917 of file GlobalsModRef.cpp.
References llvm::AAResultBase< GlobalsAAResult >::AAResultBase(), llvm::CallBase::getCalledFunction(), llvm::AAResultBase< DerivedT >::getModRefInfo(), llvm::GetUnderlyingObject(), llvm::GlobalValue::hasLocalLinkage(), llvm::intersectModRef(), llvm::isModOrRefSet(), llvm::ModRef, llvm::NoModRef, llvm::MemoryLocation::Ptr, and llvm::unionModRef().