33 #ifndef LLVM_CODEGEN_GCMETADATA_H
34 #define LLVM_CODEGEN_GCMETADATA_H
75 typedef std::vector<GCPoint>::iterator
iterator;
83 std::vector<GCRoot> Roots;
84 std::vector<GCPoint> SafePoints;
112 Roots.push_back(
GCRoot(Num, Metadata));
117 return Roots.erase(position);
124 SafePoints.emplace_back(Kind, Label, DL);
136 size_t size()
const {
return SafePoints.size(); }
180 finfo_map_type FInfoMap;
size_t roots_size() const
void addStackRoot(int Num, const Constant *Metadata)
addStackRoot - Registers a root that lives on the stack.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
GCRoot - Metadata for a pointer to an object managed by the garbage collector.
int StackOffset
Offset from the stack pointer.
PointKind
PointKind - Used to indicate whether the address of the call instruction or the address after the cal...
std::vector< GCPoint >::iterator iterator
GCPoint(GC::PointKind K, MCSymbol *L, DebugLoc DL)
std::vector< std::unique_ptr< GCFunctionInfo > > FuncInfoVec
List of per function info objects.
GCFunctionInfo & getFunctionInfo(const Function &F)
get - Look up function metadata.
An analysis pass which caches information about the entire Module.
GC::PointKind Kind
The kind of the safe point.
GCPoint - Metadata for a collector-safe point in machine code.
int Num
Usually a frame index.
roots_iterator roots_end()
GCFunctionInfo(const Function &F, GCStrategy &S)
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.
uint64_t getFrameSize() const
getFrameSize/setFrameSize - Records the function's frame size.
FuncInfoVec::iterator funcinfo_begin()
roots_iterator roots_begin()
roots_begin/roots_end - Iterators for all roots in the function.
size_t live_size(const iterator &p) const
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()
GCStrategy * getGCStrategy(const StringRef Name)
Lookup the GCStrategy object associated with the given gc name.
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.
iterator begin()
begin/end - Iterators for safe points.
iterator begin() const
begin/end - Iterators for used strategies.
GCStrategy describes a garbage collector algorithm's code generation requirements, and provides overridable hooks for those needs which cannot be abstractly described.
void clear()
clear - Resets the pass.
void setFrameSize(uint64_t S)
const ARM::ArchExtKind Kind
GCRoot(int N, const Constant *MD)
const Function & getFunction() const
getFunction - Return the function to which this metadata applies.
StringRef - Represent a constant reference to a string, i.e.
live_iterator live_end(const iterator &p)
Garbage collection metadata for a single function.
void addSafePoint(GC::PointKind Kind, MCSymbol *Label, DebugLoc DL)
addSafePoint - Notes the existence of a safe point.
std::vector< GCRoot >::iterator roots_iterator
std::vector< GCRoot >::const_iterator live_iterator
SmallVector< std::unique_ptr< GCStrategy >, 1 >::const_iterator iterator