47#ifndef LLVM_IR_GCSTRATEGY_H
48#define LLVM_IR_GCSTRATEGY_H
109 "GC strategy has useRS4GC but not useStatepoints set");
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
An analysis pass which caches information about the entire Module.
GCStrategy describes a garbage collector algorithm's code generation requirements,...
bool UseRS4GC
Uses gc.statepoints as opposed to gc.roots, if set, NeededSafePoints and UsesMetadata should be left ...
bool UsesMetadata
If set, backend must emit metadata tables.
virtual std::optional< bool > isGCManagedPointer(const Type *Ty) const
If the type specified can be reliably distinguished, returns true for pointers to GC managed location...
bool usesMetadata() const
If set, appropriate metadata tables must be emitted by the back-end (assembler, JIT,...
bool useStatepoints() const
Returns true if this strategy is expecting the use of gc.statepoints, and false otherwise.
bool needsSafePoints() const
True if safe points need to be inferred on call sites.
bool useRS4GC() const
Returns true if the RewriteStatepointsForGC pass should run on functions using this GC.
bool NeededSafePoints
If UseStatepoints is set, this determines whether the RewriteStatepointsForGC pass should rewrite thi...
const std::string & getName() const
Return the name of the GC strategy.
virtual ~GCStrategy()=default
A global registry used in conjunction with static constructors to make pluggable components (like tar...
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
This is an optimization pass for GlobalISel generic memory operations.
std::unique_ptr< GCStrategy > getGCStrategy(const StringRef Name)
Lookup the GCStrategy object associated with the given gc name.