34 void finishAssembly(
Module &M, GCModuleInfo &
Info, AsmPrinter &AP)
override;
39static GCMetadataPrinterRegistry::Add<ErlangGCPrinter>
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();
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
108 LE = MD.live_end(PI);
111 OS.
AddComment(
"stack index (offset / wordsize)");
112 AP.
emitInt16(LI->StackOffset / IntPtrSize);
Analysis containing CSE Info
Module.h This file contains the declarations for the Module class.
Machine Check Debug Module
static StringRef getName(Value *V)
static TableGen::Emitter::OptClass< SkeletonEmitter > X("gen-skeleton-class", "Generate example skeleton class")
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.
virtual void AddComment(const Twine &T, bool EOL=true)
Add a textual comment.
virtual void switchSection(MCSection *Section, uint32_t Subsec=0)
Set the current section where code is being emitted to Section.
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.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI 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.