32 #ifndef LLVM_CODEGEN_GCMETADATA_H 33 #define LLVM_CODEGEN_GCMETADATA_H 61 : Label(L), Loc(
std::move(DL)) {}
79 using iterator = std::vector<GCPoint>::iterator;
87 std::vector<GCRoot> Roots;
88 std::vector<GCPoint> SafePoints;
114 Roots.push_back(
GCRoot(Num, Metadata));
119 return Roots.erase(position);
126 SafePoints.emplace_back(Label, DL);
136 size_t size()
const {
return SafePoints.size(); }
205 #endif // LLVM_CODEGEN_GCMETADATA_H
size_t live_size(const iterator &p) const
StackOffset is a wrapper around scalable and non-scalable offsets and is used in several functions su...
void addStackRoot(int Num, const Constant *Metadata)
addStackRoot - Registers a root that lives on the stack.
This class represents lattice values for constants.
std::vector< std::unique_ptr< GCFunctionInfo > > FuncInfoVec
List of per function info objects.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
SmallVector< std::unique_ptr< GCStrategy >, 1 >::const_iterator iterator
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
GCRoot - Metadata for a pointer to an object managed by the garbage collector.
size_t roots_size() const
An analysis pass which caches information about the entire Module.
GCPoint - Metadata for a collector-safe point in machine code.
GCPoint(MCSymbol *L, DebugLoc DL)
int Num
Usually a frame index.
roots_iterator roots_end()
const Function & getFunction() const
getFunction - Return the function to which this metadata applies.
This is an important base class in LLVM.
roots_iterator removeStackRoot(roots_iterator position)
removeStackRoot - Removes a root.
GCStrategy & getStrategy()
getStrategy - Return the GC strategy for the function.
void addSafePoint(MCSymbol *Label, const DebugLoc &DL)
addSafePoint - Notes the existence of a safe point.
FuncInfoVec::iterator funcinfo_begin()
roots_iterator roots_begin()
roots_begin/roots_end - Iterators for all roots in the function.
std::vector< GCRoot >::iterator roots_iterator
ImmutablePass class - This class is used to provide information that does not need to be run...
live_iterator live_begin(const iterator &p)
live_begin/live_end - Iterators for live roots at a given safe point.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
FuncInfoVec::iterator funcinfo_end()
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
const Constant * Metadata
Metadata straight from the call to llvm.gcroot.
static void clear(coro::Shape &Shape)
iterator begin()
begin/end - Iterators for safe points.
std::vector< GCPoint >::iterator iterator
GCStrategy describes a garbage collector algorithm's code generation requirements, and provides overridable hooks for those needs which cannot be abstractly described.
iterator begin() const
begin/end - Iterators for used strategies.
uint64_t getFrameSize() const
getFrameSize/setFrameSize - Records the function's frame size.
void setFrameSize(uint64_t S)
GCRoot(int N, const Constant *MD)
std::vector< GCRoot >::const_iterator live_iterator
StringRef - Represent a constant reference to a string, i.e.
live_iterator live_end(const iterator &p)
Garbage collection metadata for a single function.