Go to the documentation of this file.
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;
205 #endif // LLVM_CODEGEN_GCMETADATA_H
This is an optimization pass for GlobalISel generic memory operations.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
live_iterator live_begin(const iterator &p)
live_begin/live_end - Iterators for live roots at a given safe point.
iterator begin() const
begin/end - Iterators for used strategies.
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.
void addSafePoint(MCSymbol *Label, const DebugLoc &DL)
addSafePoint - Notes the existence of a safe point.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
GCRoot - Metadata for a pointer to an object managed by the garbage collector.
Garbage collection metadata for a single function.
std::vector< GCPoint >::iterator iterator
roots_iterator roots_begin()
roots_begin/roots_end - Iterators for all roots in the function.
const Constant * Metadata
Metadata straight from the call to llvm.gcroot.
GCStrategy & getStrategy()
getStrategy - Return the GC strategy for the function.
the resulting code requires compare and branches when and if * p
SmallVector< std::unique_ptr< GCStrategy >, 1 >::const_iterator iterator
std::vector< GCRoot >::const_iterator live_iterator
GCPoint(MCSymbol *L, DebugLoc DL)
std::vector< std::unique_ptr< GCFunctionInfo > > FuncInfoVec
List of per function info objects.
iterator begin()
begin/end - Iterators for safe points.
void setFrameSize(uint64_t S)
GCStrategy * getGCStrategy(const StringRef Name)
Lookup the GCStrategy object associated with the given gc name.
void clear()
clear - Resets the pass.
uint64_t getFrameSize() const
getFrameSize/setFrameSize - Records the function's frame size.
live_iterator live_end(const iterator &p)
int Num
Usually a frame index.
size_t live_size(const iterator &p) const
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
This is an important base class in LLVM.
GCFunctionInfo & getFunctionInfo(const Function &F)
get - Look up function metadata.
FuncInfoVec::iterator funcinfo_end()
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
StringRef - Represent a constant reference to a string, i.e.
StackOffset is a class to represent an offset with 2 dimensions, named fixed and scalable,...
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
FuncInfoVec::iterator funcinfo_begin()
void addStackRoot(int Num, const Constant *Metadata)
addStackRoot - Registers a root that lives on the stack.
size_t roots_size() const
GCPoint - Metadata for a collector-safe point in machine code.
GCFunctionInfo(const Function &F, GCStrategy &S)
roots_iterator removeStackRoot(roots_iterator position)
removeStackRoot - Removes a root.
GCRoot(int N, const Constant *MD)
std::vector< GCRoot >::iterator roots_iterator
roots_iterator roots_end()
An analysis pass which caches information about the entire Module.
const Function & getFunction() const
getFunction - Return the function to which this metadata applies.