32#ifndef LLVM_CODEGEN_GCMETADATA_H
33#define LLVM_CODEGEN_GCMETADATA_H
79 using iterator = std::vector<GCPoint>::iterator;
87 std::vector<GCRoot> Roots;
88 std::vector<GCPoint> SafePoints;
119 return Roots.erase(position);
126 SafePoints.emplace_back(Label,
DL);
136 size_t size()
const {
return SafePoints.size(); }
178 finfo_map_type FInfoMap;
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
This file defines the StringMap class.
This file defines the DenseMap class.
This file defines the SmallVector class.
This is an important base class in LLVM.
Garbage collection metadata for a single function.
void setFrameSize(uint64_t S)
size_t roots_size() const
void addStackRoot(int Num, const Constant *Metadata)
addStackRoot - Registers a root that lives on the stack.
void addSafePoint(MCSymbol *Label, const DebugLoc &DL)
addSafePoint - Notes the existence of a safe point.
std::vector< GCRoot >::iterator roots_iterator
size_t live_size(const iterator &p) const
uint64_t getFrameSize() const
getFrameSize/setFrameSize - Records the function's frame size.
iterator begin()
begin/end - Iterators for safe points.
live_iterator live_begin(const iterator &p)
live_begin/live_end - Iterators for live roots at a given safe point.
roots_iterator removeStackRoot(roots_iterator position)
removeStackRoot - Removes a root.
GCStrategy & getStrategy()
getStrategy - Return the GC strategy for the function.
live_iterator live_end(const iterator &p)
std::vector< GCRoot >::const_iterator live_iterator
roots_iterator roots_end()
std::vector< GCPoint >::iterator iterator
const Function & getFunction() const
getFunction - Return the function to which this metadata applies.
GCFunctionInfo(const Function &F, GCStrategy &S)
roots_iterator roots_begin()
roots_begin/roots_end - Iterators for all roots in the function.
An analysis pass which caches information about the entire Module.
FuncInfoVec::iterator funcinfo_end()
FuncInfoVec::iterator funcinfo_begin()
GCFunctionInfo & getFunctionInfo(const Function &F)
get - Look up function metadata.
iterator begin() const
begin/end - Iterators for used strategies.
void clear()
clear - Resets the pass.
GCStrategy * getGCStrategy(const StringRef Name)
Lookup the GCStrategy object associated with the given gc name.
std::vector< std::unique_ptr< GCFunctionInfo > > FuncInfoVec
List of per function info objects.
GCStrategy describes a garbage collector algorithm's code generation requirements,...
ImmutablePass class - This class is used to provide information that does not need to be run.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StackOffset holds a fixed and a scalable offset in bytes.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
StringRef - Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
GCPoint - Metadata for a collector-safe point in machine code.
GCPoint(MCSymbol *L, DebugLoc DL)
GCRoot - Metadata for a pointer to an object managed by the garbage collector.
GCRoot(int N, const Constant *MD)
const Constant * Metadata
Metadata straight from the call to llvm.gcroot.
int Num
Usually a frame index.