Describes a garbage collector algorithm's code generation requirements.

Synopsis

Declared in <llvm/IR/GCStrategy.h>

class GCStrategy;

Description

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.

Member Functions

Name

Description

GCStrategy [constructor]

Construct a GCStrategy with default option flags.

~GCStrategy [destructor] [virtual]

Destroy this GCStrategy.

getName

Return the name of the GC strategy. This is the value of the collector name string specified on functions which use this strategy.

isGCManagedPointer [virtual]

Returns whether Ty is a pointer to a GC‐managed location, if known.

needsSafePoints

True if safe points need to be inferred on call sites.

useRS4GC

Returns true if the RewriteStatepointsForGC pass should run on functions using this GC.

useStatepoints

Returns true if this strategy is expecting the use of gc.statepoints, and false otherwise.

usesMetadata

Returns true if the back‐end must emit GC metadata tables.

Protected Data Members

Name

Description

NeededSafePoints

if set, calls are inferred to be safepoints

UseRS4GC

Whether RewriteStatepointsForGC should rewrite calls when UseStatepoints is set.

UseStatepoints

Whether this strategy uses gc.statepoints instead of gc.roots.

UsesMetadata

If set, backend must emit metadata tables.

Friends

Name

Description

llvm::CollectorMetadataAnalysis

An analysis pass which caches information about the entire Module. Records a cache of the 'active' gc strategy objects for the current Module.

llvm::GCModuleInfo

Module analysis that caches per‐function GC info and active strategies.

Non-Member Functions

Name

Description

getGCStrategy

Lookup the GCStrategy object associated with the given gc name.

Created with MrDocs