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

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

Public Member Functions

 FunctionInfo ()
 Checks to document the invariants of the bit packing here. More...
 
 ~FunctionInfo ()
 
 FunctionInfo (const FunctionInfo &Arg)
 
 FunctionInfo (FunctionInfo &&Arg)
 
FunctionInfooperator= (const FunctionInfo &RHS)
 
FunctionInfooperator= (FunctionInfo &&RHS)
 
ModRefInfo globalClearMayReadAnyGlobal (int I) const
 This method clears MayReadAnyGlobal bit added by GlobalsAAResult to return the corresponding ModRefInfo. More...
 
ModRefInfo getModRefInfo () const
 Returns the ModRefInfo info for this function. More...
 
void addModRefInfo (ModRefInfo NewMRI)
 Adds new ModRefInfo for this function to its state. More...
 
bool mayReadAnyGlobal () const
 Returns whether this function may read any global variable, and we don't know which global. More...
 
void setMayReadAnyGlobal ()
 Sets this function as potentially reading from any global. More...
 
ModRefInfo getModRefInfoForGlobal (const GlobalValue &GV) const
 Returns the ModRefInfo info for this function w.r.t. More...
 
void addFunctionInfo (const FunctionInfo &FI)
 Add mod/ref info from another function into ours, saturating towards ModRef. More...
 
void addModRefInfoForGlobal (const GlobalValue &GV, ModRefInfo NewMRI)
 
void eraseModRefInfoForGlobal (const GlobalValue &GV)
 Clear a global's ModRef info. More...
 

Detailed Description

The mod/ref information collected for a particular function.

We collect information about mod/ref behavior of a function here, both in general and as pertains to specific globals. We only have this detailed information when we know something useful about the behavior. If we saturate to fully general mod/ref, we remove the info for the function.

Definition at line 61 of file GlobalsModRef.cpp.

Constructor & Destructor Documentation

◆ FunctionInfo() [1/3]

llvm::GlobalsAAResult::FunctionInfo::FunctionInfo ( )
inline

Checks to document the invariants of the bit packing here.

Definition at line 102 of file GlobalsModRef.cpp.

References Info.

◆ ~FunctionInfo()

llvm::GlobalsAAResult::FunctionInfo::~FunctionInfo ( )
inline

Definition at line 103 of file GlobalsModRef.cpp.

References Info.

◆ FunctionInfo() [2/3]

llvm::GlobalsAAResult::FunctionInfo::FunctionInfo ( const FunctionInfo Arg)
inline

◆ FunctionInfo() [3/3]

llvm::GlobalsAAResult::FunctionInfo::FunctionInfo ( FunctionInfo &&  Arg)
inline

Definition at line 114 of file GlobalsModRef.cpp.

References Arg, and Info.

Member Function Documentation

◆ addFunctionInfo()

void llvm::GlobalsAAResult::FunctionInfo::addFunctionInfo ( const FunctionInfo FI)
inline

◆ addModRefInfo()

void llvm::GlobalsAAResult::FunctionInfo::addModRefInfo ( ModRefInfo  NewMRI)
inline

Adds new ModRefInfo for this function to its state.

Definition at line 146 of file GlobalsModRef.cpp.

References Info, and llvm::setMust().

Referenced by llvm::GlobalsAAResult::FunctionInfo::addFunctionInfo().

◆ addModRefInfoForGlobal()

void llvm::GlobalsAAResult::FunctionInfo::addModRefInfoForGlobal ( const GlobalValue GV,
ModRefInfo  NewMRI 
)
inline

Definition at line 183 of file GlobalsModRef.cpp.

References Info, P, and llvm::unionModRef().

Referenced by llvm::GlobalsAAResult::FunctionInfo::addFunctionInfo().

◆ eraseModRefInfoForGlobal()

void llvm::GlobalsAAResult::FunctionInfo::eraseModRefInfoForGlobal ( const GlobalValue GV)
inline

Clear a global's ModRef info.

Should be used when a global is being deleted.

Definition at line 195 of file GlobalsModRef.cpp.

References E, F(), I, Info, and P.

◆ getModRefInfo()

ModRefInfo llvm::GlobalsAAResult::FunctionInfo::getModRefInfo ( ) const
inline

Returns the ModRefInfo info for this function.

Definition at line 141 of file GlobalsModRef.cpp.

References llvm::GlobalsAAResult::FunctionInfo::globalClearMayReadAnyGlobal(), and Info.

Referenced by llvm::GlobalsAAResult::FunctionInfo::addFunctionInfo().

◆ getModRefInfoForGlobal()

ModRefInfo llvm::GlobalsAAResult::FunctionInfo::getModRefInfoForGlobal ( const GlobalValue GV) const
inline

Returns the ModRefInfo info for this function w.r.t.

a particular global, which may be more precise than the general information above.

Definition at line 159 of file GlobalsModRef.cpp.

References I, Info, llvm::GlobalsAAResult::FunctionInfo::mayReadAnyGlobal(), llvm::NoModRef, P, llvm::Ref, and llvm::unionModRef().

◆ globalClearMayReadAnyGlobal()

ModRefInfo llvm::GlobalsAAResult::FunctionInfo::globalClearMayReadAnyGlobal ( int  I) const
inline

This method clears MayReadAnyGlobal bit added by GlobalsAAResult to return the corresponding ModRefInfo.

It must align in functionality with clearMust().

Definition at line 135 of file GlobalsModRef.cpp.

References llvm::ModRef, and llvm::NoModRef.

Referenced by llvm::GlobalsAAResult::FunctionInfo::getModRefInfo().

◆ mayReadAnyGlobal()

bool llvm::GlobalsAAResult::FunctionInfo::mayReadAnyGlobal ( ) const
inline

Returns whether this function may read any global variable, and we don't know which global.

Definition at line 152 of file GlobalsModRef.cpp.

References Info.

Referenced by llvm::GlobalsAAResult::FunctionInfo::addFunctionInfo(), and llvm::GlobalsAAResult::FunctionInfo::getModRefInfoForGlobal().

◆ operator=() [1/2]

FunctionInfo& llvm::GlobalsAAResult::FunctionInfo::operator= ( const FunctionInfo RHS)
inline

◆ operator=() [2/2]

FunctionInfo& llvm::GlobalsAAResult::FunctionInfo::operator= ( FunctionInfo &&  RHS)
inline

Definition at line 125 of file GlobalsModRef.cpp.

References Info.

◆ setMayReadAnyGlobal()

void llvm::GlobalsAAResult::FunctionInfo::setMayReadAnyGlobal ( )
inline

Sets this function as potentially reading from any global.

Definition at line 155 of file GlobalsModRef.cpp.

References Info.

Referenced by llvm::GlobalsAAResult::FunctionInfo::addFunctionInfo().


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