LLVM 22.0.0git
|
Garbage collection metadata for a single function. More...
#include "llvm/CodeGen/GCMetadata.h"
Public Types | |
using | iterator = std::vector< GCPoint >::iterator |
using | roots_iterator = std::vector< GCRoot >::iterator |
using | live_iterator = std::vector< GCRoot >::const_iterator |
Public Member Functions | |
LLVM_ABI | GCFunctionInfo (const Function &F, GCStrategy &S) |
LLVM_ABI | ~GCFunctionInfo () |
LLVM_ABI bool | invalidate (Function &F, const PreservedAnalyses &PA, FunctionAnalysisManager::Invalidator &Inv) |
Handle invalidation explicitly. | |
const Function & | getFunction () const |
getFunction - Return the function to which this metadata applies. | |
GCStrategy & | getStrategy () |
getStrategy - Return the GC strategy for the function. | |
void | addStackRoot (int Num, const Constant *Metadata) |
addStackRoot - Registers a root that lives on the stack. | |
roots_iterator | removeStackRoot (roots_iterator position) |
removeStackRoot - Removes a root. | |
void | addSafePoint (MCSymbol *Label, const DebugLoc &DL) |
addSafePoint - Notes the existence of a safe point. | |
uint64_t | getFrameSize () const |
getFrameSize/setFrameSize - Records the function's frame size. | |
void | setFrameSize (uint64_t S) |
iterator | begin () |
begin/end - Iterators for safe points. | |
iterator | end () |
size_t | size () const |
roots_iterator | roots_begin () |
roots_begin/roots_end - Iterators for all roots in the function. | |
roots_iterator | roots_end () |
size_t | roots_size () const |
live_iterator | live_begin (const iterator &p) |
live_begin/live_end - Iterators for live roots at a given safe point. | |
live_iterator | live_end (const iterator &p) |
size_t | live_size (const iterator &p) const |
Garbage collection metadata for a single function.
Currently, this information only applies to GCStrategies which use GCRoot.
Definition at line 80 of file GCMetadata.h.
using llvm::GCFunctionInfo::iterator = std::vector<GCPoint>::iterator |
Definition at line 82 of file GCMetadata.h.
using llvm::GCFunctionInfo::live_iterator = std::vector<GCRoot>::const_iterator |
Definition at line 84 of file GCMetadata.h.
using llvm::GCFunctionInfo::roots_iterator = std::vector<GCRoot>::iterator |
Definition at line 83 of file GCMetadata.h.
LLVM_ABI llvm::GCFunctionInfo::GCFunctionInfo | ( | const Function & | F, |
GCStrategy & | S | ||
) |
|
default |
addSafePoint - Notes the existence of a safe point.
Num is the ID of the label just prior to the safe point (if the code generator is using MachineModuleInfo).
Definition at line 132 of file GCMetadata.h.
References DL.
addStackRoot - Registers a root that lives on the stack.
Num is the stack object ID for the alloca (if the code generator is
Definition at line 120 of file GCMetadata.h.
|
inline |
begin/end - Iterators for safe points.
Definition at line 141 of file GCMetadata.h.
|
inline |
Definition at line 142 of file GCMetadata.h.
|
inline |
getFrameSize/setFrameSize - Records the function's frame size.
Definition at line 137 of file GCMetadata.h.
getFunction - Return the function to which this metadata applies.
Definition at line 112 of file GCMetadata.h.
References F.
|
inline |
getStrategy - Return the GC strategy for the function.
Definition at line 115 of file GCMetadata.h.
Referenced by llvm::SelectionDAGBuilder::LowerStatepoint().
bool GCFunctionInfo::invalidate | ( | Function & | F, |
const PreservedAnalyses & | PA, | ||
FunctionAnalysisManager::Invalidator & | Inv | ||
) |
Handle invalidation explicitly.
Definition at line 81 of file GCMetadata.cpp.
References llvm::PreservedAnalyses::getChecker().
|
inline |
live_begin/live_end - Iterators for live roots at a given safe point.
Definition at line 151 of file GCMetadata.h.
References roots_begin().
|
inline |
Definition at line 152 of file GCMetadata.h.
References roots_end().
Definition at line 153 of file GCMetadata.h.
References roots_size().
|
inline |
removeStackRoot - Removes a root.
Definition at line 125 of file GCMetadata.h.
|
inline |
roots_begin/roots_end - Iterators for all roots in the function.
Definition at line 146 of file GCMetadata.h.
Referenced by live_begin().
|
inline |
Definition at line 147 of file GCMetadata.h.
Referenced by live_end().
|
inline |
Definition at line 148 of file GCMetadata.h.
Referenced by live_size().
|
inline |
Definition at line 138 of file GCMetadata.h.
|
inline |
Definition at line 143 of file GCMetadata.h.