LLVM  8.0.1
Public Types | Public Member Functions | List of all members
llvm::GCFunctionInfo Class Reference

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

 GCFunctionInfo (const Function &F, GCStrategy &S)
 
 ~GCFunctionInfo ()
 
const FunctiongetFunction () const
 getFunction - Return the function to which this metadata applies. More...
 
GCStrategygetStrategy ()
 getStrategy - Return the GC strategy for the function. More...
 
void addStackRoot (int Num, const Constant *Metadata)
 addStackRoot - Registers a root that lives on the stack. More...
 
roots_iterator removeStackRoot (roots_iterator position)
 removeStackRoot - Removes a root. More...
 
void addSafePoint (MCSymbol *Label, const DebugLoc &DL)
 addSafePoint - Notes the existence of a safe point. More...
 
uint64_t getFrameSize () const
 getFrameSize/setFrameSize - Records the function's frame size. More...
 
void setFrameSize (uint64_t S)
 
iterator begin ()
 begin/end - Iterators for safe points. More...
 
iterator end ()
 
size_t size () const
 
roots_iterator roots_begin ()
 roots_begin/roots_end - Iterators for all roots in the function. More...
 
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. More...
 
live_iterator live_end (const iterator &p)
 
size_t live_size (const iterator &p) const
 

Detailed Description

Garbage collection metadata for a single function.

Currently, this information only applies to GCStrategies which use GCRoot.

Definition at line 78 of file GCMetadata.h.

Member Typedef Documentation

◆ iterator

Definition at line 80 of file GCMetadata.h.

◆ live_iterator

using llvm::GCFunctionInfo::live_iterator = std::vector<GCRoot>::const_iterator

Definition at line 82 of file GCMetadata.h.

◆ roots_iterator

Definition at line 81 of file GCMetadata.h.

Constructor & Destructor Documentation

◆ GCFunctionInfo()

llvm::GCFunctionInfo::GCFunctionInfo ( const Function F,
GCStrategy S 
)

◆ ~GCFunctionInfo()

GCFunctionInfo::~GCFunctionInfo ( )
default

Referenced by INITIALIZE_PASS().

Member Function Documentation

◆ addSafePoint()

void llvm::GCFunctionInfo::addSafePoint ( MCSymbol Label,
const DebugLoc DL 
)
inline

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 126 of file GCMetadata.h.

◆ addStackRoot()

void llvm::GCFunctionInfo::addStackRoot ( int  Num,
const Constant Metadata 
)
inline

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 114 of file GCMetadata.h.

◆ begin()

iterator llvm::GCFunctionInfo::begin ( )
inline

begin/end - Iterators for safe points.

Definition at line 135 of file GCMetadata.h.

Referenced by llvm::createGCInfoPrinter(), and EmitCamlGlobal().

◆ end()

iterator llvm::GCFunctionInfo::end ( )
inline

Definition at line 136 of file GCMetadata.h.

Referenced by llvm::createGCInfoPrinter(), and EmitCamlGlobal().

◆ getFrameSize()

uint64_t llvm::GCFunctionInfo::getFrameSize ( ) const
inline

getFrameSize/setFrameSize - Records the function's frame size.

Definition at line 131 of file GCMetadata.h.

Referenced by EmitCamlGlobal().

◆ getFunction()

const Function& llvm::GCFunctionInfo::getFunction ( ) const
inline

getFunction - Return the function to which this metadata applies.

Definition at line 106 of file GCMetadata.h.

References F().

Referenced by llvm::createGCInfoPrinter(), and EmitCamlGlobal().

◆ getStrategy()

GCStrategy& llvm::GCFunctionInfo::getStrategy ( )
inline

getStrategy - Return the GC strategy for the function.

Definition at line 109 of file GCMetadata.h.

Referenced by EmitCamlGlobal(), and InsertRootInitializers().

◆ live_begin()

live_iterator llvm::GCFunctionInfo::live_begin ( const iterator p)
inline

live_begin/live_end - Iterators for live roots at a given safe point.

Definition at line 145 of file GCMetadata.h.

Referenced by llvm::createGCInfoPrinter(), and EmitCamlGlobal().

◆ live_end()

live_iterator llvm::GCFunctionInfo::live_end ( const iterator p)
inline

Definition at line 146 of file GCMetadata.h.

Referenced by llvm::createGCInfoPrinter(), and EmitCamlGlobal().

◆ live_size()

size_t llvm::GCFunctionInfo::live_size ( const iterator p) const
inline

Definition at line 147 of file GCMetadata.h.

Referenced by EmitCamlGlobal().

◆ removeStackRoot()

roots_iterator llvm::GCFunctionInfo::removeStackRoot ( roots_iterator  position)
inline

removeStackRoot - Removes a root.

Definition at line 119 of file GCMetadata.h.

◆ roots_begin()

roots_iterator llvm::GCFunctionInfo::roots_begin ( )
inline

roots_begin/roots_end - Iterators for all roots in the function.

Definition at line 140 of file GCMetadata.h.

Referenced by llvm::createGCInfoPrinter().

◆ roots_end()

roots_iterator llvm::GCFunctionInfo::roots_end ( )
inline

Definition at line 141 of file GCMetadata.h.

Referenced by llvm::createGCInfoPrinter().

◆ roots_size()

size_t llvm::GCFunctionInfo::roots_size ( ) const
inline

Definition at line 142 of file GCMetadata.h.

◆ setFrameSize()

void llvm::GCFunctionInfo::setFrameSize ( uint64_t  S)
inline

Definition at line 132 of file GCMetadata.h.

◆ size()

size_t llvm::GCFunctionInfo::size ( ) const
inline

Definition at line 137 of file GCMetadata.h.


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