LLVM API Documentation
#include <GCStrategy.h>
Public Types | |
typedef std::vector < std::unique_ptr < 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 | |
bool | needsSafePoint (GC::PointKind Kind) const |
needsSafePoint(Kind) - True if the given kind of safe point is | |
bool | customWriteBarrier () const |
bool | customReadBarrier () const |
bool | customRoots () const |
bool | customSafePoints () const |
bool | initializeRoots () const |
initializeRoots - If set, gcroot intrinsics should initialize their | |
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. | |
bool | CustomReadBarriers |
Default is to insert loads. | |
bool | CustomWriteBarriers |
Default is to insert stores. | |
bool | CustomRoots |
Default is to pass through to backend. | |
bool | CustomSafePoints |
bool | InitRoots |
If set, roots are nulled during lowering. | |
bool | UsesMetadata |
If set, backend must emit metadata tables. | |
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<std::unique_ptr<GCFunctionInfo> > llvm::GCStrategy::list_type |
Definition at line 57 of file GCStrategy.h.
Definition at line 95 of file GCStrategy.cpp.
virtual llvm::GCStrategy::~GCStrategy | ( | ) | [inline, virtual] |
Definition at line 80 of file GCStrategy.h.
iterator llvm::GCStrategy::begin | ( | ) | [inline] |
begin/end - Iterators for function metadata.
Definition at line 134 of file GCStrategy.h.
Referenced by llvm::GCMetadataPrinter::begin().
bool llvm::GCStrategy::customReadBarrier | ( | ) | const [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.
bool llvm::GCStrategy::customRoots | ( | ) | const [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.
bool llvm::GCStrategy::customSafePoints | ( | ) | const [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.
bool llvm::GCStrategy::customWriteBarrier | ( | ) | const [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.
iterator llvm::GCStrategy::end | ( | ) | [inline] |
Definition at line 135 of file GCStrategy.h.
Referenced by llvm::GCMetadataPrinter::end().
bool GCStrategy::findCustomSafePoints | ( | GCFunctionInfo & | FI, |
MachineFunction & | MF | ||
) | [virtual] |
Definition at line 113 of file GCStrategy.cpp.
References llvm::dbgs(), getName(), and llvm_unreachable.
const Module& llvm::GCStrategy::getModule | ( | ) | const [inline] |
getModule - The module within which the GC strategy is operating.
Definition at line 89 of file GCStrategy.h.
Referenced by llvm::GCMetadataPrinter::getModule().
const std::string& llvm::GCStrategy::getName | ( | ) | const [inline] |
getName - The name of the GC strategy, for debugging.
Definition at line 85 of file GCStrategy.h.
References Name.
Referenced by findCustomSafePoints(), and performCustomLowering().
bool GCStrategy::initializeCustomLowering | ( | Module & | F | ) | [virtual] |
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 105 of file GCStrategy.cpp.
bool llvm::GCStrategy::initializeRoots | ( | ) | const [inline] |
initializeRoots - If set, gcroot intrinsics should initialize their
Definition at line 126 of file GCStrategy.h.
References InitRoots.
insertFunctionMetadata - Creates metadata for a function.
Definition at line 119 of file GCStrategy.cpp.
bool llvm::GCStrategy::needsSafePoint | ( | GC::PointKind | Kind | ) | const [inline] |
needsSafePoint(Kind) - True if the given kind of safe point is
Definition at line 99 of file GCStrategy.h.
References NeededSafePoints.
bool llvm::GCStrategy::needsSafePoints | ( | ) | const [inline] |
needsSafePoitns - True if safe points of any kind are required. By
Definition at line 93 of file GCStrategy.h.
References CustomSafePoints, and NeededSafePoints.
bool GCStrategy::performCustomLowering | ( | Function & | F | ) | [virtual] |
Definition at line 107 of file GCStrategy.cpp.
References llvm::dbgs(), getName(), and llvm_unreachable.
bool llvm::GCStrategy::usesMetadata | ( | ) | const [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 class GCModuleInfo [friend] |
Definition at line 61 of file GCStrategy.h.
bool llvm::GCStrategy::CustomReadBarriers [protected] |
Default is to insert loads.
Definition at line 69 of file GCStrategy.h.
Referenced by customReadBarrier().
bool llvm::GCStrategy::CustomRoots [protected] |
Default is to pass through to backend.
Definition at line 71 of file GCStrategy.h.
Referenced by customRoots().
bool llvm::GCStrategy::CustomSafePoints [protected] |
Default is to use NeededSafePoints to find safe points.
Definition at line 72 of file GCStrategy.h.
Referenced by customSafePoints(), and needsSafePoints().
bool llvm::GCStrategy::CustomWriteBarriers [protected] |
Default is to insert stores.
Definition at line 70 of file GCStrategy.h.
Referenced by customWriteBarrier().
bool llvm::GCStrategy::InitRoots [protected] |
If set, roots are nulled during lowering.
Definition at line 74 of file GCStrategy.h.
Referenced by initializeRoots().
unsigned llvm::GCStrategy::NeededSafePoints [protected] |
Bitmask of required safe points.
Definition at line 68 of file GCStrategy.h.
Referenced by needsSafePoint(), and needsSafePoints().
bool llvm::GCStrategy::UsesMetadata [protected] |
If set, backend must emit metadata tables.
Definition at line 75 of file GCStrategy.h.
Referenced by usesMetadata().