LLVM  6.0.0svn
Classes | Public Member Functions | Static Public Member Functions | List of all members
llvm::GlobalsAAResult Class Reference

An alias analysis result set for globals. More...

#include "llvm/Analysis/GlobalsModRef.h"

Inheritance diagram for llvm::GlobalsAAResult:
Inheritance graph
[legend]
Collaboration diagram for llvm::GlobalsAAResult:
Collaboration graph
[legend]

Classes

class  FunctionInfo
 The mod/ref information collected for a particular function. More...
 

Public Member Functions

 GlobalsAAResult (GlobalsAAResult &&Arg)
 
 ~GlobalsAAResult ()
 
AliasResult 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. More...
 
ModRefInfo getModRefInfo (ImmutableCallSite CS, const MemoryLocation &Loc)
 
FunctionModRefBehavior getModRefBehavior (const Function *F)
 getModRefBehavior - Return the behavior of the specified function if called from the specified call site. More...
 
FunctionModRefBehavior getModRefBehavior (ImmutableCallSite CS)
 getModRefBehavior - Return the behavior of the specified function if called from the specified call site. More...
 
- Public Member Functions inherited from llvm::AAResultBase< GlobalsAAResult >
AliasResult alias (const MemoryLocation &LocA, const MemoryLocation &LocB)
 
bool pointsToConstantMemory (const MemoryLocation &Loc, bool OrLocal)
 
ModRefInfo getArgModRefInfo (ImmutableCallSite CS, unsigned ArgIdx)
 
FunctionModRefBehavior getModRefBehavior (ImmutableCallSite CS)
 
FunctionModRefBehavior getModRefBehavior (const Function *F)
 
ModRefInfo getModRefInfo (ImmutableCallSite CS, const MemoryLocation &Loc)
 
ModRefInfo getModRefInfo (ImmutableCallSite CS1, ImmutableCallSite CS2)
 

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ GlobalsAAResult()

GlobalsAAResult::GlobalsAAResult ( GlobalsAAResult &&  Arg)

Definition at line 919 of file GlobalsModRef.cpp.

References Arg, assert(), and H.

◆ ~GlobalsAAResult()

GlobalsAAResult::~GlobalsAAResult ( )

Definition at line 933 of file GlobalsModRef.cpp.

Member Function Documentation

◆ alias()

AliasResult GlobalsAAResult::alias ( const MemoryLocation LocA,
const MemoryLocation LocB 
)

◆ analyzeModule()

GlobalsAAResult GlobalsAAResult::analyzeModule ( Module M,
const TargetLibraryInfo TLI,
CallGraph CG 
)
static

◆ getModRefBehavior() [1/2]

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 229 of file GlobalsModRef.cpp.

References llvm::FMRB_DoesNotAccessMemory, llvm::FMRB_OnlyReadsMemory, llvm::FMRB_UnknownModRefBehavior, llvm::AAResultBase< DerivedT >::getModRefBehavior(), llvm::MRI_Mod, and llvm::MRI_NoModRef.

◆ getModRefBehavior() [2/2]

FunctionModRefBehavior GlobalsAAResult::getModRefBehavior ( ImmutableCallSite  CS)

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 243 of file GlobalsModRef.cpp.

References llvm::GlobalsAAResult::FunctionInfo::addFunctionInfo(), llvm::GlobalsAAResult::FunctionInfo::addModRefInfo(), assert(), llvm::sys::path::begin(), C, Callee, llvm::SmallPtrSetImplBase::clear(), E, llvm::sys::path::end(), F(), llvm::FMRB_DoesNotAccessMemory, llvm::FMRB_OnlyReadsMemory, llvm::FMRB_UnknownModRefBehavior, llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCalledFunction(), llvm::Module::getDataLayout(), llvm::Function::getFunction(), llvm::GlobalVariable::getInitializer(), llvm::AAResultBase< DerivedT >::getModRefBehavior(), llvm::GlobalsAAResult::FunctionInfo::getModRefInfo(), llvm::Operator::getOpcode(), llvm::GlobalValue::getParent(), llvm::Value::getType(), llvm::GetUnderlyingObject(), llvm::GlobalValue::hasLocalLinkage(), llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::hasOperandBundles(), I, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::instructions(), llvm::is_contained(), llvm::isAllocationFn(), llvm::isAllocLikeFn(), llvm::isFreeCall(), llvm::Type::isPointerTy(), llvm::MRI_Mod, llvm::MRI_ModRef, llvm::MRI_NoModRef, llvm::MRI_Ref, llvm::scc_begin(), llvm::GlobalsAAResult::FunctionInfo::setMayReadAnyGlobal(), SI, llvm::Value::users(), and llvm::Value::uses().

◆ getModRefInfo()

ModRefInfo GlobalsAAResult::getModRefInfo ( ImmutableCallSite  CS,
const MemoryLocation Loc 
)

The documentation for this class was generated from the following files: