LLVM API Documentation

Public Types | Public Member Functions | Protected Attributes | Friends
llvm::GCStrategy Class Reference

#include <GCStrategy.h>

Collaboration diagram for llvm::GCStrategy:
Collaboration graph
[legend]

List of all members.

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 ModulegetModule () 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 ()
GCFunctionInfoinsertFunctionInfo (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

Detailed Description

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.


Member Typedef Documentation

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.


Constructor & Destructor Documentation

Definition at line 95 of file GCStrategy.cpp.

virtual llvm::GCStrategy::~GCStrategy ( ) [inline, virtual]

Definition at line 80 of file GCStrategy.h.


Member Function Documentation

begin/end - Iterators for function metadata.

Definition at line 134 of file GCStrategy.h.

Referenced by llvm::GCMetadataPrinter::begin().

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.

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.

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.

Definition at line 135 of file GCStrategy.h.

Referenced by llvm::GCMetadataPrinter::end().

Definition at line 113 of file GCStrategy.cpp.

References llvm::dbgs(), getName(), and llvm_unreachable.

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().

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.

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.

needsSafePoint(Kind) - True if the given kind of safe point is

Definition at line 99 of file GCStrategy.h.

References NeededSafePoints.

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 107 of file GCStrategy.cpp.

References llvm::dbgs(), getName(), and llvm_unreachable.

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.


Friends And Related Function Documentation

friend class GCModuleInfo [friend]

Definition at line 61 of file GCStrategy.h.


Member Data Documentation

Default is to insert loads.

Definition at line 69 of file GCStrategy.h.

Referenced by customReadBarrier().

Default is to pass through to backend.

Definition at line 71 of file GCStrategy.h.

Referenced by customRoots().

Default is to use NeededSafePoints to find safe points.

Definition at line 72 of file GCStrategy.h.

Referenced by customSafePoints(), and needsSafePoints().

Default is to insert stores.

Definition at line 70 of file GCStrategy.h.

Referenced by customWriteBarrier().

If set, roots are nulled during lowering.

Definition at line 74 of file GCStrategy.h.

Referenced by initializeRoots().

Bitmask of required safe points.

Definition at line 68 of file GCStrategy.h.

Referenced by needsSafePoint(), and needsSafePoints().

If set, backend must emit metadata tables.

Definition at line 75 of file GCStrategy.h.

Referenced by usesMetadata().


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