LLVM API Documentation
#include <GCStrategy.h>
Public Types | |
typedef std::vector < GCFunctionInfo * > | list_type |
typedef list_type::iterator | iterator |
Public Member Functions | |
GCStrategy () | |
virtual | ~GCStrategy () |
const std::string & | getName () const |
const Module & | getModule () const |
bool | needsSafePoints () const |
needsSafePoitns - True if safe points of any kind are required. By More... | |
bool | needsSafePoint (GC::PointKind Kind) const |
needsSafePoint(Kind) - True if the given kind of safe point is More... | |
bool | customWriteBarrier () const |
bool | customReadBarrier () const |
bool | customRoots () const |
bool | customSafePoints () const |
bool | initializeRoots () const |
initializeRoots - If set, gcroot intrinsics should initialize their More... | |
bool | usesMetadata () const |
iterator | begin () |
iterator | end () |
GCFunctionInfo * | insertFunctionInfo (const Function &F) |
virtual bool | initializeCustomLowering (Module &F) |
virtual bool | performCustomLowering (Function &F) |
virtual bool | findCustomSafePoints (GCFunctionInfo &FI, MachineFunction &MF) |
Protected Attributes | |
unsigned | NeededSafePoints |
Bitmask of required safe points. More... | |
bool | CustomReadBarriers |
Default is to insert loads. More... | |
bool | CustomWriteBarriers |
Default is to insert stores. More... | |
bool | CustomRoots |
Default is to pass through to backend. More... | |
bool | CustomSafePoints |
bool | InitRoots |
If set, roots are nulled during lowering. More... | |
bool | UsesMetadata |
If set, backend must emit metadata tables. More... | |
Friends | |
class | GCModuleInfo |
GCStrategy describes a garbage collector algorithm's code generation requirements, and provides overridable hooks for those needs which cannot be abstractly described.
Definition at line 55 of file GCStrategy.h.
typedef list_type::iterator llvm::GCStrategy::iterator |
Definition at line 58 of file GCStrategy.h.
typedef std::vector<GCFunctionInfo*> llvm::GCStrategy::list_type |
Definition at line 57 of file GCStrategy.h.
GCStrategy::GCStrategy | ( | ) |
Definition at line 95 of file GCStrategy.cpp.
|
virtual |
Definition at line 105 of file GCStrategy.cpp.
|
inline |
begin/end - Iterators for function metadata.
Definition at line 134 of file GCStrategy.h.
Referenced by llvm::GCMetadataPrinter::begin(), and ~GCStrategy().
|
inline |
customReadBarrier - By default, read barriers are replaced with simple load instructions. If true, then performCustomLowering must instead lower them.
Definition at line 111 of file GCStrategy.h.
References CustomReadBarriers.
|
inline |
customRoots - By default, roots are left for the code generator so it can generate a stack map. If true, then
Definition at line 116 of file GCStrategy.h.
References CustomRoots.
|
inline |
customSafePoints - By default, the GC analysis will find safe points according to NeededSafePoints. If true, then findCustomSafePoints must create them.
Definition at line 121 of file GCStrategy.h.
References CustomSafePoints.
|
inline |
customWriteBarrier - By default, write barriers are replaced with simple store instructions. If true, then performCustomLowering must instead lower them.
Definition at line 106 of file GCStrategy.h.
References CustomWriteBarriers.
|
inline |
Definition at line 135 of file GCStrategy.h.
Referenced by llvm::GCMetadataPrinter::end(), and ~GCStrategy().
|
virtual |
Definition at line 120 of file GCStrategy.cpp.
References llvm::dbgs(), getName(), and llvm_unreachable.
|
inline |
getModule - The module within which the GC strategy is operating.
Definition at line 89 of file GCStrategy.h.
Referenced by llvm::GCMetadataPrinter::getModule().
|
inline |
getName - The name of the GC strategy, for debugging.
Definition at line 85 of file GCStrategy.h.
Referenced by findCustomSafePoints(), and performCustomLowering().
initializeCustomLowering/performCustomLowering - If any of the actions are set to custom, performCustomLowering must be overriden to transform the corresponding actions to LLVM IR. initializeCustomLowering is optional to override. These are the only GCStrategy methods through which the LLVM IR can be modified.
Definition at line 112 of file GCStrategy.cpp.
|
inline |
initializeRoots - If set, gcroot intrinsics should initialize their
Definition at line 126 of file GCStrategy.h.
References InitRoots.
GCFunctionInfo * GCStrategy::insertFunctionInfo | ( | const Function & | F | ) |
insertFunctionMetadata - Creates metadata for a function.
Definition at line 126 of file GCStrategy.cpp.
Referenced by llvm::GCModuleInfo::getFunctionInfo().
|
inline |
needsSafePoint(Kind) - True if the given kind of safe point is
Definition at line 99 of file GCStrategy.h.
References NeededSafePoints.
|
inline |
needsSafePoitns - True if safe points of any kind are required. By
Definition at line 93 of file GCStrategy.h.
References CustomSafePoints, and NeededSafePoints.
Definition at line 114 of file GCStrategy.cpp.
References llvm::dbgs(), getName(), and llvm_unreachable.
|
inline |
usesMetadata - If set, appropriate metadata tables must be emitted by the back-end (assembler, JIT, or otherwise).
Definition at line 130 of file GCStrategy.h.
References UsesMetadata.
|
friend |
Definition at line 61 of file GCStrategy.h.
|
protected |
Default is to insert loads.
Definition at line 69 of file GCStrategy.h.
Referenced by customReadBarrier().
|
protected |
Default is to pass through to backend.
Definition at line 71 of file GCStrategy.h.
Referenced by customRoots().
|
protected |
Default is to use NeededSafePoints to find safe points.
Definition at line 72 of file GCStrategy.h.
Referenced by customSafePoints(), and needsSafePoints().
|
protected |
Default is to insert stores.
Definition at line 70 of file GCStrategy.h.
Referenced by customWriteBarrier().
|
protected |
If set, roots are nulled during lowering.
Definition at line 74 of file GCStrategy.h.
Referenced by initializeRoots().
|
protected |
Bitmask of required safe points.
Definition at line 68 of file GCStrategy.h.
Referenced by needsSafePoint(), and needsSafePoints().
|
protected |
If set, backend must emit metadata tables.
Definition at line 75 of file GCStrategy.h.
Referenced by usesMetadata().