LLVM API Documentation

llvm::GCStrategy Class Reference

#include <GCStrategy.h>

Collaboration diagram for llvm::GCStrategy:
[legend]

List of all members.

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

Protected Attributes

unsigned NeededSafePoints
bool CustomReadBarriers
bool CustomWriteBarriers
bool CustomRoots
bool InitRoots
bool UsesMetadata

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 54 of file GCStrategy.h.


Member Typedef Documentation

Definition at line 56 of file GCStrategy.h.

typedef list_type::iterator llvm::GCStrategy::iterator

Definition at line 57 of file GCStrategy.h.


Constructor & Destructor Documentation

GCStrategy::GCStrategy (  ) 

Definition at line 91 of file GCStrategy.cpp.

GCStrategy::~GCStrategy (  )  [virtual]

Definition at line 100 of file GCStrategy.cpp.

References begin(), E, and end().


Member Function Documentation

const std::string& llvm::GCStrategy::getName (  )  const [inline]

getName - The name of the GC strategy, for debugging.

Definition at line 82 of file GCStrategy.h.

References Name.

Referenced by performCustomLowering().

const Module& llvm::GCStrategy::getModule (  )  const [inline]

getModule - The module within which the GC strategy is operating.

Definition at line 86 of file GCStrategy.h.

References M.

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

bool llvm::GCStrategy::needsSafePoints (  )  const [inline]

needsSafePoitns - True if safe points of any kind are required. By

Definition at line 90 of file GCStrategy.h.

References NeededSafePoints.

bool llvm::GCStrategy::needsSafePoint ( GC::PointKind  Kind  )  const [inline]

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

Definition at line 94 of file GCStrategy.h.

References NeededSafePoints.

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 101 of file GCStrategy.h.

References CustomWriteBarriers.

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 106 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 111 of file GCStrategy.h.

References CustomRoots.

bool llvm::GCStrategy::initializeRoots (  )  const [inline]

initializeRoots - If set, gcroot intrinsics should initialize their

Definition at line 116 of file GCStrategy.h.

References InitRoots.

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 120 of file GCStrategy.h.

References UsesMetadata.

iterator llvm::GCStrategy::begin (  )  [inline]

begin/end - Iterators for function metadata.

Definition at line 124 of file GCStrategy.h.

References Functions.

Referenced by llvm::GCMetadataPrinter::begin(), and ~GCStrategy().

iterator llvm::GCStrategy::end (  )  [inline]

Definition at line 125 of file GCStrategy.h.

References Functions.

Referenced by llvm::GCMetadataPrinter::end(), and ~GCStrategy().

GCFunctionInfo * GCStrategy::insertFunctionInfo ( const Function &  F  ) 

insertFunctionMetadata - Creates metadata for a function.

Definition at line 115 of file GCStrategy.cpp.

References FI.

Referenced by llvm::GCModuleInfo::getFunctionInfo().

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

bool GCStrategy::performCustomLowering ( Function &  F  )  [virtual]

Definition at line 109 of file GCStrategy.cpp.

References llvm::cerr(), and getName().


Friends And Related Function Documentation

friend class GCModuleInfo [friend]

Definition at line 60 of file GCStrategy.h.


Member Data Documentation

Definition at line 67 of file GCStrategy.h.

Referenced by needsSafePoint(), and needsSafePoints().

Definition at line 68 of file GCStrategy.h.

Referenced by customReadBarrier().

Definition at line 69 of file GCStrategy.h.

Referenced by customWriteBarrier().

Definition at line 70 of file GCStrategy.h.

Referenced by customRoots().

bool llvm::GCStrategy::InitRoots [protected]

Definition at line 71 of file GCStrategy.h.

Referenced by initializeRoots().

Definition at line 72 of file GCStrategy.h.

Referenced by usesMetadata().


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