LLVM  14.0.0git
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 ()
 
bool invalidate (Module &M, const PreservedAnalyses &PA, ModuleAnalysisManager::Invalidator &)
 
AliasResult alias (const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI)
 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 (const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)
 
FunctionModRefBehavior getModRefBehavior (const Function *F)
 getModRefBehavior - Return the behavior of the specified function if called from the specified call site. More...
 
FunctionModRefBehavior getModRefBehavior (const CallBase *Call)
 getModRefBehavior - Return the behavior of the specified function if called from the specified call site. More...
 
ModRefInfo getModRefInfo (const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)
 
ModRefInfo getModRefInfo (const CallBase *Call1, const CallBase *Call2, AAQueryInfo &AAQI)
 
- Public Member Functions inherited from llvm::AAResultBase< GlobalsAAResult >
AliasResult alias (const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI)
 
bool pointsToConstantMemory (const MemoryLocation &Loc, AAQueryInfo &AAQI, bool OrLocal)
 
ModRefInfo getArgModRefInfo (const CallBase *Call, unsigned ArgIdx)
 
FunctionModRefBehavior getModRefBehavior (const CallBase *Call)
 
FunctionModRefBehavior getModRefBehavior (const Function *F)
 
ModRefInfo getModRefInfo (const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)
 
ModRefInfo getModRefInfo (const CallBase *Call1, const CallBase *Call2, AAQueryInfo &AAQI)
 

Static Public Member Functions

static GlobalsAAResult analyzeModule (Module &M, std::function< const TargetLibraryInfo &(Function &F)> GetTLI, 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 31 of file GlobalsModRef.h.

Constructor & Destructor Documentation

◆ GlobalsAAResult()

GlobalsAAResult::GlobalsAAResult ( GlobalsAAResult &&  Arg)

Definition at line 968 of file GlobalsModRef.cpp.

References Arg, assert(), and H.

◆ ~GlobalsAAResult()

GlobalsAAResult::~GlobalsAAResult ( )

Definition at line 982 of file GlobalsModRef.cpp.

Member Function Documentation

◆ alias()

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

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

References llvm::AAResultBase< DerivedT >::alias(), EnableUnsafeGlobalsModRefAliasResults, llvm::getUnderlyingObject(), llvm::AliasResult::NoAlias, llvm::MemoryLocation::Ptr, and llvm::Value::stripPointerCastsForAliasAnalysis().

◆ analyzeModule()

GlobalsAAResult GlobalsAAResult::analyzeModule ( Module M,
std::function< const TargetLibraryInfo &(Function &F)>  GetTLI,
CallGraph CG 
)
static

Definition at line 984 of file GlobalsModRef.cpp.

References M.

Referenced by llvm::GlobalsAA::run(), and llvm::GlobalsAAWrapperPass::runOnModule().

◆ getModRefBehavior() [1/2]

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

References F, llvm::FMRB_DoesNotAccessMemory, llvm::FMRB_OnlyReadsMemory, llvm::FMRB_UnknownModRefBehavior, llvm::AAResultBase< DerivedT >::getModRefBehavior(), llvm::isModOrRefSet(), and llvm::isModSet().

◆ getModRefBehavior() [2/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 246 of file GlobalsModRef.cpp.

References F, llvm::FMRB_DoesNotAccessMemory, llvm::FMRB_OnlyReadsMemory, llvm::FMRB_UnknownModRefBehavior, llvm::AAResultBase< DerivedT >::getModRefBehavior(), llvm::isModOrRefSet(), and llvm::isModSet().

◆ getModRefInfo() [1/3]

ModRefInfo llvm::AAResultBase< DerivedT >::getModRefInfo
inline

Definition at line 1241 of file AliasAnalysis.h.

◆ getModRefInfo() [2/3]

ModRefInfo GlobalsAAResult::getModRefInfo ( const CallBase Call,
const MemoryLocation Loc,
AAQueryInfo AAQI 
)

◆ getModRefInfo() [3/3]

ModRefInfo llvm::AAResultBase< DerivedT >::getModRefInfo
inline

Definition at line 1246 of file AliasAnalysis.h.

◆ invalidate()

bool GlobalsAAResult::invalidate ( Module M,
const PreservedAnalyses PA,
ModuleAnalysisManager::Invalidator  
)

Definition at line 815 of file GlobalsModRef.cpp.

References llvm::PreservedAnalyses::getChecker().


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