LLVM 20.0.0git
Classes | Public Member Functions | Static Public Member Functions | Friends | 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]

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, const Instruction *CtxI)
 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.
 
ModRefInfo getModRefInfo (const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)
 
MemoryEffects getMemoryEffects (const Function *F)
 getMemoryEffects - Return the behavior of the specified function if called from the specified call site.
 
ModRefInfo getModRefInfo (const CallBase *Call, const MemoryLocation &Loc, AAQueryInfo &AAQI)
 
ModRefInfo getModRefInfo (const CallBase *Call1, const CallBase *Call2, AAQueryInfo &AAQI)
 
MemoryEffects getMemoryEffects (const CallBase *Call, AAQueryInfo &AAQI)
 
MemoryEffects getMemoryEffects (const Function *F)
 
- Public Member Functions inherited from llvm::AAResultBase
AliasResult alias (const MemoryLocation &LocA, const MemoryLocation &LocB, AAQueryInfo &AAQI, const Instruction *I)
 
ModRefInfo getModRefInfoMask (const MemoryLocation &Loc, AAQueryInfo &AAQI, bool IgnoreLocals)
 
ModRefInfo getArgModRefInfo (const CallBase *Call, unsigned ArgIdx)
 
MemoryEffects getMemoryEffects (const CallBase *Call, AAQueryInfo &AAQI)
 
MemoryEffects getMemoryEffects (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)
 

Friends

struct RecomputeGlobalsAAPass
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::AAResultBase
 AAResultBase ()=default
 
 AAResultBase (const AAResultBase &Arg)
 
 AAResultBase (AAResultBase &&Arg)
 

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 30 of file GlobalsModRef.h.

Constructor & Destructor Documentation

◆ GlobalsAAResult()

GlobalsAAResult::GlobalsAAResult ( GlobalsAAResult &&  Arg)

Definition at line 961 of file GlobalsModRef.cpp.

References assert(), and H.

◆ ~GlobalsAAResult()

GlobalsAAResult::~GlobalsAAResult ( )
default

Member Function Documentation

◆ alias()

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

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

References EnableUnsafeGlobalsModRefAliasResults, llvm::getUnderlyingObject(), llvm::AliasResult::MayAlias, 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

◆ getMemoryEffects() [1/3]

MemoryEffects llvm::AAResultBase::getMemoryEffects ( const CallBase Call,
AAQueryInfo AAQI 
)
inline

Definition at line 839 of file AliasAnalysis.h.

◆ getMemoryEffects() [2/3]

MemoryEffects llvm::AAResultBase::getMemoryEffects ( const Function F)
inline

Definition at line 843 of file AliasAnalysis.h.

◆ getMemoryEffects() [3/3]

MemoryEffects GlobalsAAResult::getMemoryEffects ( const Function F)

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

References F, and llvm::MemoryEffectsBase< LocationEnum >::unknown().

◆ getModRefInfo() [1/3]

ModRefInfo llvm::AAResultBase::getModRefInfo ( const CallBase Call,
const MemoryLocation Loc,
AAQueryInfo AAQI 
)
inline

Definition at line 847 of file AliasAnalysis.h.

◆ getModRefInfo() [2/3]

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

◆ getModRefInfo() [3/3]

ModRefInfo llvm::AAResultBase::getModRefInfo ( const CallBase Call1,
const CallBase Call2,
AAQueryInfo AAQI 
)
inline

Definition at line 852 of file AliasAnalysis.h.

◆ invalidate()

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

Definition at line 810 of file GlobalsModRef.cpp.

References llvm::PreservedAnalyses::getChecker().

Friends And Related Function Documentation

◆ RecomputeGlobalsAAPass

friend struct RecomputeGlobalsAAPass
friend

Definition at line 79 of file GlobalsModRef.h.


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