40 X(
"erlang",
"erlang-compatible garbage collector");
45 unsigned IntPtrSize = M.getDataLayout().getPointerSize();
52 for (GCModuleInfo::FuncInfoVec::iterator FI =
Info.funcinfo_begin(),
53 IE =
Info.funcinfo_end();
75 OS.AddComment(
"safe point count");
81 OS.AddComment(
"safe point address");
91 OS.AddComment(
"stack frame size (in words)");
92 AP.
emitInt16(MD.getFrameSize() / IntPtrSize);
95 unsigned RegisteredArgs = IntPtrSize == 4 ? 5 : 6;
96 unsigned StackArity = MD.getFunction().arg_size() > RegisteredArgs
97 ? MD.getFunction().arg_size() - RegisteredArgs
99 OS.AddComment(
"stack arity");
103 OS.AddComment(
"live root count");
108 LE = MD.live_end(PI);
111 OS.AddComment(
"stack index (offset / wordsize)");
112 AP.
emitInt16(LI->StackOffset / IntPtrSize);
Analysis containing CSE Info
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
Module.h This file contains the declarations for the Module class.
static StringRef getName(Value *V)
This class is intended to be used as a driving class for all asm writers.
const TargetLoweringObjectFile & getObjFileLowering() const
Return information about object file lowering.
void emitLabelPlusOffset(const MCSymbol *Label, uint64_t Offset, unsigned Size, bool IsSectionRelative=false) const
Emit something like ".long Label+Offset" where the size in bytes of the directive is specified by Siz...
void emitAlignment(Align Alignment, const GlobalObject *GV=nullptr, unsigned MaxBytesToEmit=0) const
Emit an alignment directive to the specified power of two boundary.
std::unique_ptr< MCStreamer > OutStreamer
This is the MCStreamer object for the file we are generating.
void emitInt16(int Value) const
Emit a short directive and value.
Garbage collection metadata for a single function.
GCStrategy & getStrategy()
getStrategy - Return the GC strategy for the function.
std::vector< GCRoot >::const_iterator live_iterator
std::vector< GCPoint >::iterator iterator
An analysis pass which caches information about the entire Module.
const std::string & getName() const
Return the name of the GC strategy.
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
MCContext & getContext() const
Streaming machine code generation interface.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
A Module instance is used to store all the information related to an LLVM module.
A static registration template.
This is an optimization pass for GlobalISel generic memory operations.
void linkErlangGCPrinter()
Creates an erlang-compatible metadata printer.
This struct is a compact representation of a valid (non-zero power of two) alignment.
GCPoint - Metadata for a collector-safe point in machine code.