LLVM
8.0.1
|
GCStrategy describes a garbage collector algorithm's code generation requirements, and provides overridable hooks for those needs which cannot be abstractly described. More...
#include "llvm/CodeGen/GCStrategy.h"
Public Member Functions | |
GCStrategy () | |
virtual | ~GCStrategy ()=default |
const std::string & | getName () const |
Return the name of the GC strategy. More... | |
bool | useStatepoints () const |
Returns true if this strategy is expecting the use of gc.statepoints, and false otherwise. More... | |
Statepoint Specific Properties | |
virtual Optional< bool > | isGCManagedPointer (const Type *Ty) const |
If the type specified can be reliably distinguished, returns true for pointers to GC managed locations and false for pointers to non-GC managed locations. More... | |
GCRoot Specific Properties | |
These properties and overrides only apply to collector strategies using GCRoot. | |
bool | needsSafePoints () const |
True if safe points need to be inferred on call sites. More... | |
bool | usesMetadata () const |
If set, appropriate metadata tables must be emitted by the back-end (assembler, JIT, or otherwise). More... | |
Protected Attributes | |
bool | UseStatepoints = false |
bool | NeededSafePoints = false |
Uses gc.statepoints as opposed to gc.roots, if set, none of the other options can be anything but their default values. More... | |
bool | UsesMetadata = false |
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.
GCStrategy objects must be looked up through the Function. The objects themselves are owned by the Context and must be immutable.
Definition at line 67 of file GCStrategy.h.
|
default |
|
virtualdefault |
|
inline |
Return the name of the GC strategy.
This is the value of the collector name string specified on functions which use this strategy.
Definition at line 87 of file GCStrategy.h.
References Name.
Referenced by EmitCamlGlobal(), and llvm::AsmPrinter::isBlockOnlyReachableByFallthrough().
If the type specified can be reliably distinguished, returns true for pointers to GC managed locations and false for pointers to non-GC managed locations.
Note a GCStrategy can always return 'None' (i.e. an empty optional indicating it can't reliably distinguish.
Definition at line 100 of file GCStrategy.h.
References llvm::None.
Referenced by lowerStatepointMetaArgs().
|
inline |
True if safe points need to be inferred on call sites.
Definition at line 112 of file GCStrategy.h.
References NeededSafePoints.
|
inline |
If set, appropriate metadata tables must be emitted by the back-end (assembler, JIT, or otherwise).
For statepoint, this method is currently unsupported. The stackmap information can be found in the StackMap section as described in the documentation.
Definition at line 118 of file GCStrategy.h.
References UsesMetadata.
Referenced by llvm::AsmPrinter::isBlockOnlyReachableByFallthrough().
|
inline |
Returns true if this strategy is expecting the use of gc.statepoints, and false otherwise.
Definition at line 91 of file GCStrategy.h.
References UseStatepoints.
|
friend |
Definition at line 69 of file GCStrategy.h.
Uses gc.statepoints as opposed to gc.roots, if set, none of the other options can be anything but their default values.
if set, calls are inferred to be safepoints
Definition at line 78 of file GCStrategy.h.
Referenced by needsSafePoints().
If set, backend must emit metadata tables.
Definition at line 79 of file GCStrategy.h.
Referenced by usesMetadata().
Definition at line 74 of file GCStrategy.h.
Referenced by useStatepoints().