class AsmPrinter
Declaration
class AsmPrinter : public MachineFunctionPass { /* full declaration omitted */ };
Description
This class is intended to be used as a driving class for all asm writers.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:82
Inherits from: MachineFunctionPass
Member Variables
- public llvm::TargetMachine& TM
- Target machine description.
- public const llvm::MCAsmInfo* MAI
- Target Asm Printer information.
- public llvm::MCContext& OutContext
- This is the context for the output file that we are streaming. This owns all of the global MC-related objects for the generated translation unit.
- public std::unique_ptr<MCStreamer> OutStreamer
- This is the MCStreamer object for the file we are generating. This contains the transient state for the current translation unit that we are generating (such as the current section etc).
- public llvm::MachineFunction* MF = nullptr
- The current machine function.
- public llvm::MachineModuleInfo* MMI = nullptr
- This is a pointer to the current MachineModuleInfo.
- public llvm::MachineDominatorTree* MDT = nullptr
- This is a pointer to the current MachineDominatorTree.
- public llvm::MachineLoopInfo* MLI = nullptr
- This is a pointer to the current MachineLoopInfo.
- public llvm::MachineOptimizationRemarkEmitter* ORE
- Optimization remark emitter.
- public llvm::MCSymbol* CurrentPatchableFunctionEntrySym = nullptr
- The symbol for the entry in __patchable_function_entires.
- public llvm::MCSymbol* CurrentFnSym = nullptr
- The symbol for the current function. This is recalculated at the beginning of each call to runOnMachineFunction().
- public llvm::MCSymbol* CurrentFnDescSym = nullptr
- The symbol for the current function descriptor on AIX. This is created at the beginning of each call to SetupMachineFunction().
- public llvm::MCSymbol* CurrentFnSymForSize = nullptr
- The symbol used to represent the start of the current function for the purpose of calculating its size (e.g. using the .size directive). By default, this is equal to CurrentFnSym.
- public MapVector<unsigned int, llvm::AsmPrinter::MBBSectionRange> MBBSectionRanges
- public MapVector<const llvm::MCSymbol*, llvm::AsmPrinter::GOTEquivUsePair> GlobalGOTEquivs
- private llvm::MCSymbol* CurrentFnEnd = nullptr
- private DenseMap<unsigned int, llvm::MCSymbol*> MBBSectionExceptionSyms
- Map a basic block section ID to the exception symbol associated with that section. Map entries are assigned and looked up via AsmPrinter::getMBBExceptionSym.
- private llvm::MCSymbol* CurrentSectionBeginSym = nullptr
- private std::unique_ptr<AddrLabelMap> AddrLabelSymbols
- This map keeps track of which symbol is being used for the specified basic block's address of label.
- private void* GCMetadataPrinters = nullptr
- private bool VerboseAsm
- Emit comments in assembly output if this is true.
- private std::unique_ptr<raw_fd_ostream> StackUsageStream
- Output stream for the stack usage file (i.e., .su file).
- protected llvm::MCSymbol* CurrentFnBegin = nullptr
- protected std::vector<HandlerInfo> Handlers
- A vector of all debug/EH info emitters we should use. This vector maintains ownership of the emitters.
- protected size_t NumUserHandlers = 0
- private std::unique_ptr<MachineDominatorTree> OwnedMDT
- If generated on the fly this own the instance.
- private std::unique_ptr<MachineLoopInfo> OwnedMLI
- If generated on the fly this own the instance.
- private llvm::DwarfDebug* DD = nullptr
- If the target supports dwarf debug info, this pointer is non-null.
- private llvm::PseudoProbeHandler* PP = nullptr
- A handler that supports pseudo probe emission with embedded inline context.
- private llvm::AsmPrinter::CFISection ModuleCFISection = CFISection::None
- CFISection type the module needs i.e. either .eh_frame or .debug_frame.
- private bool HasSplitStack = false
- True if the module contains split-stack functions. This is used to emit .note.GNU-split-stack section as required by the linker for special handling split-stack function calling no-split-stack function.
- private bool HasNoSplitStack = false
- True if the module contains no-split-stack functions. This is used to emit .note.GNU-no-split-stack section when it also contains functions without a split stack prologue.
- public SmallVector<llvm::AsmPrinter::XRayFunctionEntry, 4> Sleds
- private const llvm::MachineInstr* LastMI = nullptr
- Private state for PrintSpecial()
- private unsigned int LastFn = 0
- private unsigned int Counter = ~0U
- private static char ID
Method Overview
- protected AsmPrinter(llvm::TargetMachine & TM, std::unique_ptr<MCStreamer> Streamer)
- public void EmitToStreamer(llvm::MCStreamer & S, const llvm::MCInst & Inst)
- public llvm::MCSymbol * GetBlockAddressSymbol(const llvm::BlockAddress * BA) const
- public llvm::MCSymbol * GetBlockAddressSymbol(const llvm::BasicBlock * BB) const
- public virtual llvm::MCSymbol * GetCPISymbol(unsigned int CPID) const
- public llvm::MCSymbol * GetExternalSymbolSymbol(llvm::StringRef Sym) const
- public llvm::MCSymbol * GetJTISymbol(unsigned int JTID, bool isLinkerPrivate = false) const
- public llvm::MCSymbol * GetJTSetSymbol(unsigned int UID, unsigned int MBBID) const
- private llvm::GCMetadataPrinter * GetOrCreateGCPrinter(llvm::GCStrategy & S)
- public unsigned int GetSizeOfEncodedValue(unsigned int Encoding) const
- public virtual bool PrintAsmMemoryOperand(const llvm::MachineInstr * MI, unsigned int OpNo, const char * ExtraCode, llvm::raw_ostream & OS)
- public virtual bool PrintAsmOperand(const llvm::MachineInstr * MI, unsigned int OpNo, const char * ExtraCode, llvm::raw_ostream & OS)
- public virtual void PrintSpecial(const llvm::MachineInstr * MI, llvm::raw_ostream & OS, llvm::StringRef Code) const
- public virtual void PrintSymbolOperand(const llvm::MachineOperand & MO, llvm::raw_ostream & OS)
- public virtual void SetupMachineFunction(llvm::MachineFunction & MF)
- public void addAsmPrinterHandler(llvm::AsmPrinter::HandlerInfo Handler)
- private unsigned int addInlineAsmDiagBuffer(llvm::StringRef AsmStr, const llvm::MDNode * LocMDNode) const
- public void computeGlobalGOTEquivs(llvm::Module & M)
- public llvm::MCSymbol * createTempSymbol(const llvm::Twine & Name) const
- public bool doFinalization(llvm::Module & M)
- public bool doInitialization(llvm::Module & M)
- public void emitAlignment(llvm::Align Alignment, const llvm::GlobalObject * GV = nullptr, unsigned int MaxBytesToEmit = 0) const
- public void emitBBAddrMapSection(const llvm::MachineFunction & MF)
- public virtual void emitBasicBlockEnd(const llvm::MachineBasicBlock & MBB)
- public virtual void emitBasicBlockStart(const llvm::MachineBasicBlock & MBB)
- public void emitCFIInstruction(const llvm::MachineInstr & MI)
- public void emitCFIInstruction(const llvm::MCCFIInstruction & Inst) const
- public void emitCallSiteOffset(const llvm::MCSymbol * Hi, const llvm::MCSymbol * Lo, unsigned int Encoding) const
- public void emitCallSiteValue(uint64_t Value, unsigned int Encoding) const
- public virtual void emitConstantPool()
- public virtual void emitDebugValue(const llvm::MCExpr * Value, unsigned int Size) const
- public void emitDwarfAbbrev(const llvm::DIEAbbrev & Abbrev) const
- public template <typename T>void emitDwarfAbbrevs(const T & Abbrevs) const
- public void emitDwarfDIE(const llvm::DIE & Die) const
- public void emitDwarfLengthOrOffset(uint64_t Value) const
- public void emitDwarfOffset(const llvm::MCSymbol * Label, uint64_t Offset) const
- public void emitDwarfStringOffset(llvm::DwarfStringPoolEntryRef S) const
- public void emitDwarfStringOffset(llvm::DwarfStringPoolEntry S) const
- public void emitDwarfSymbolReference(const llvm::MCSymbol * Label, bool ForceOffset = false) const
- public void emitDwarfUnitLength(uint64_t Length, const llvm::Twine & Comment) const
- public llvm::MCSymbol * emitDwarfUnitLength(const llvm::Twine & Prefix, const llvm::Twine & Comment) const
- public void emitEncodingByte(unsigned int Val, const char * Desc = nullptr) const
- public virtual void emitEndOfAsmFile(llvm::Module &)
- public void emitFrameAlloc(const llvm::MachineInstr & MI)
- public void emitFunctionBody()
- public virtual void emitFunctionBodyEnd()
- public virtual void emitFunctionBodyStart()
- public virtual void emitFunctionDescriptor()
- public virtual void emitFunctionEntryLabel()
- private virtual void emitFunctionHeader()
- private virtual void emitFunctionHeaderComment()
- private void emitGlobalAlias(llvm::Module & M, const llvm::GlobalAlias & GA)
- public void emitGlobalConstant(const llvm::DataLayout & DL, const llvm::Constant * CV, llvm::AsmPrinter::AliasMapTy * AliasList = nullptr)
- public void emitGlobalGOTEquivs()
- private void emitGlobalIFunc(llvm::Module & M, const llvm::GlobalIFunc & GI)
- public virtual void emitGlobalVariable(const llvm::GlobalVariable * GV)
- public virtual void emitImplicitDef(const llvm::MachineInstr * MI) const
- public void emitInitialRawDwarfLocDirective(const llvm::MachineFunction & MF)
- private void emitInlineAsm(llvm::StringRef Str, const llvm::MCSubtargetInfo & STI, const llvm::MCTargetOptions & MCOptions, const llvm::MDNode * LocMDNode = nullptr, InlineAsm::AsmDialect AsmDialect = InlineAsm::AD_ATT) const
- private void emitInlineAsm(const llvm::MachineInstr * MI) const
- public virtual void emitInlineAsmEnd(const llvm::MCSubtargetInfo & StartInfo, const llvm::MCSubtargetInfo * EndInfo) const
- public virtual void emitInlineAsmStart() const
- public virtual void emitInstruction(const llvm::MachineInstr *)
- public void emitInt16(int Value) const
- public void emitInt32(int Value) const
- public void emitInt64(uint64_t Value) const
- public void emitInt8(int Value) const
- private void emitJumpTableEntry(const llvm::MachineJumpTableInfo * MJTI, const llvm::MachineBasicBlock * MBB, unsigned int uid) const
- public virtual void emitJumpTableInfo()
- private void emitLLVMUsedList(const llvm::ConstantArray * InitList)
- public void emitLabelDifference(const llvm::MCSymbol * Hi, const llvm::MCSymbol * Lo, unsigned int Size) const
- public void emitLabelDifferenceAsULEB128(const llvm::MCSymbol * Hi, const llvm::MCSymbol * Lo) const
- public void emitLabelPlusOffset(const llvm::MCSymbol * Label, uint64_t Offset, unsigned int Size, bool IsSectionRelative = false) const
- public void emitLabelReference(const llvm::MCSymbol * Label, unsigned int Size, bool IsSectionRelative = false) const
- public virtual void emitLinkage(const llvm::GlobalValue * GV, llvm::MCSymbol * GVSym) const
- public virtual void emitMachineConstantPoolValue(llvm::MachineConstantPoolValue * MCPV)
- private void emitModuleCommandLines(llvm::Module & M)
- private void emitModuleIdents(llvm::Module & M)
- public void emitNops(unsigned int N)
- public void emitPatchableFunctionEntries()
- public void emitPseudoProbe(const llvm::MachineInstr & MI)
- public void emitRemarksSection(remarks::RemarkStreamer & RS)
- public void emitSLEB128(int64_t Value, const char * Desc = nullptr) const
- public bool emitSpecialLLVMGlobal(const llvm::GlobalVariable * GV)
- public void emitStackMaps(llvm::StackMaps & SM)
- public void emitStackSizeSection(const llvm::MachineFunction & MF)
- public void emitStackUsage(const llvm::MachineFunction & MF)
- public virtual void emitStartOfAsmFile(llvm::Module &)
- public virtual void emitTTypeReference(const llvm::GlobalValue * GV, unsigned int Encoding)
- public void emitULEB128(uint64_t Value, const char * Desc = nullptr, unsigned int PadTo = 0) const
- public void emitVisibility(llvm::MCSymbol * Sym, unsigned int Visibility, bool IsDefinition = true) const
- public void emitXRayTable()
- public virtual void emitXXStructor(const llvm::DataLayout & DL, const llvm::Constant * CV)
- public virtual void emitXXStructorList(const llvm::DataLayout & DL, const llvm::Constant * List, bool IsCtor)
- public llvm::MCSymbol * getAddrLabelSymbol(const llvm::BasicBlock * BB)
- public ArrayRef<llvm::MCSymbol *> getAddrLabelSymbolToEmit(const llvm::BasicBlock * BB)
- public void getAnalysisUsage(llvm::AnalysisUsage & AU) const
- public const llvm::MCSection * getCurrentSection() const
- public const llvm::DataLayout & getDataLayout() const
- public llvm::DwarfDebug * getDwarfDebug() const
- public llvm::DwarfDebug * getDwarfDebug()
- public dwarf::FormParams getDwarfFormParams() const
- public unsigned int getDwarfOffsetByteSize() const
- public uint16_t getDwarfVersion() const
- public llvm::MCSymbol * getFunctionBegin() const
- public llvm::AsmPrinter::CFISection getFunctionCFISectionType(const llvm::Function & F) const
- public llvm::AsmPrinter::CFISection getFunctionCFISectionType(const llvm::MachineFunction & MF) const
- public llvm::MCSymbol * getFunctionEnd() const
- public virtual const llvm::MCSymbol * getFunctionFrameSymbol() const
- public unsigned int getFunctionNumber() const
- public static llvm::Align getGVAlignment(const llvm::GlobalObject * GV, const llvm::DataLayout & DL, llvm::Align InAlign = llvm::Align(1))
- public virtual unsigned int getISAEncoding()
- public llvm::MCSymbol * getMBBExceptionSym(const llvm::MachineBasicBlock & MBB)
- public llvm::AsmPrinter::CFISection getModuleCFISectionType() const
- public void getNameWithPrefix(SmallVectorImpl<char> & Name, const llvm::GlobalValue * GV) const
- public const llvm::TargetLoweringObjectFile & getObjFileLowering() const
- public unsigned int getPointerSize() const
- public const llvm::MCSubtargetInfo & getSubtargetInfo() const
- public llvm::MCSymbol * getSymbol(const llvm::GlobalValue * GV) const
- public llvm::MCSymbol * getSymbolPreferLocal(const llvm::GlobalValue & GV) const
- public llvm::MCSymbol * getSymbolWithGlobalValueBase(const llvm::GlobalValue * GV, llvm::StringRef Suffix) const
- public unsigned int getUnitLengthFieldByteSize() const
- public virtual bool isBlockOnlyReachableByFallthrough(const llvm::MachineBasicBlock * MBB) const
- public bool isDwarf64() const
- public bool isPositionIndependent() const
- public bool isVerbose() const
- public virtual const llvm::MCExpr * lowerConstant(const llvm::Constant * CV)
- public bool needsCFIForDebug() const
- public bool needsSEHMoves()
- public void preprocessXXStructorList(const llvm::DataLayout & DL, const llvm::Constant * List, SmallVector<llvm::AsmPrinter::Structor, 8> & Structors)
- public void printOffset(int64_t Offset, llvm::raw_ostream & OS) const
- public void recordSled(llvm::MCSymbol * Sled, const llvm::MachineInstr & MI, llvm::AsmPrinter::SledKind Kind, uint8_t Version = 0)
- public bool runOnMachineFunction(llvm::MachineFunction & MF)
- public void setDwarfVersion(uint16_t Version)
- private bool shouldEmitLabelForBasicBlock(const llvm::MachineBasicBlock & MBB) const
- protected virtual bool shouldEmitWeakSwiftAsyncExtendedFramePointerFlags() const
- public void takeDeletedSymbolsForFunction(const llvm::Function * F, std::vector<MCSymbol *> & Result)
- public ~AsmPrinter()
Inherited from MachineFunctionPass:
- public doInitialization
- protected getAnalysisUsage
- protected getClearedProperties
- protected getRequiredProperties
- protected getSetProperties
- protected runOnMachineFunction
Inherited from FunctionPass:
- public assignPassManager
- public createPrinterPass
- public getPotentialPassManagerType
- public runOnFunction
- protected skipFunction
Inherited from Pass:
- public assignPassManager
- public createPass
- public createPrinterPass
- public doFinalization
- public doInitialization
- public dump
- public dumpPassStructure
- public getAdjustedAnalysisPointer
- public getAnalysis
- public getAnalysis
- public getAnalysisID
- public getAnalysisID
- public getAnalysisIfAvailable
- public getAnalysisUsage
- public getAsImmutablePass
- public getAsPMDataManager
- public getPassID
- public getPassKind
- public getPassName
- public getPotentialPassManagerType
- public getResolver
- public lookupPassInfo
- public lookupPassInfo
- public mustPreserveAnalysisID
- public preparePassManager
- public print
- public releaseMemory
- public setResolver
- public verifyAnalysis
Methods
¶AsmPrinter(llvm::TargetMachine& TM,
std::unique_ptr<MCStreamer> Streamer)
AsmPrinter(llvm::TargetMachine& TM,
std::unique_ptr<MCStreamer> Streamer)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:230
Parameters
- llvm::TargetMachine& TM
- std::unique_ptr<MCStreamer> Streamer
¶void EmitToStreamer(llvm::MCStreamer& S,
const llvm::MCInst& Inst)
void EmitToStreamer(llvm::MCStreamer& S,
const llvm::MCInst& Inst)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:302
Parameters
- llvm::MCStreamer& S
- const llvm::MCInst& Inst
¶llvm::MCSymbol* GetBlockAddressSymbol(
const llvm::BlockAddress* BA) const
llvm::MCSymbol* GetBlockAddressSymbol(
const llvm::BlockAddress* BA) const
Description
Return the MCSymbol used to satisfy BlockAddress uses of the specified basic block.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:597
Parameters
- const llvm::BlockAddress* BA
¶llvm::MCSymbol* GetBlockAddressSymbol(
const llvm::BasicBlock* BB) const
llvm::MCSymbol* GetBlockAddressSymbol(
const llvm::BasicBlock* BB) const
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:598
Parameters
- const llvm::BasicBlock* BB
¶virtual llvm::MCSymbol* GetCPISymbol(
unsigned int CPID) const
virtual llvm::MCSymbol* GetCPISymbol(
unsigned int CPID) const
Description
Return the symbol for the specified constant pool entry.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:545
Parameters
- unsigned int CPID
¶llvm::MCSymbol* GetExternalSymbolSymbol(
llvm::StringRef Sym) const
llvm::MCSymbol* GetExternalSymbolSymbol(
llvm::StringRef Sym) const
Description
Return the MCSymbol for the specified ExternalSymbol.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:586
Parameters
- llvm::StringRef Sym
¶llvm::MCSymbol* GetJTISymbol(
unsigned int JTID,
bool isLinkerPrivate = false) const
llvm::MCSymbol* GetJTISymbol(
unsigned int JTID,
bool isLinkerPrivate = false) const
Description
Return the symbol for the specified jump table entry.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:589
Parameters
- unsigned int JTID
- bool isLinkerPrivate = false
¶llvm::MCSymbol* GetJTSetSymbol(
unsigned int UID,
unsigned int MBBID) const
llvm::MCSymbol* GetJTSetSymbol(
unsigned int UID,
unsigned int MBBID) const
Description
Return the symbol for the specified jump table .set FIXME: privatize to AsmPrinter.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:593
Parameters
- unsigned int UID
- unsigned int MBBID
¶llvm::GCMetadataPrinter* GetOrCreateGCPrinter(
llvm::GCStrategy& S)
llvm::GCMetadataPrinter* GetOrCreateGCPrinter(
llvm::GCStrategy& S)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:838
Parameters
¶unsigned int GetSizeOfEncodedValue(
unsigned int Encoding) const
unsigned int GetSizeOfEncodedValue(
unsigned int Encoding) const
Description
Return the size of the encoding in bytes.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:659
Parameters
- unsigned int Encoding
¶virtual bool PrintAsmMemoryOperand(
const llvm::MachineInstr* MI,
unsigned int OpNo,
const char* ExtraCode,
llvm::raw_ostream& OS)
virtual bool PrintAsmMemoryOperand(
const llvm::MachineInstr* MI,
unsigned int OpNo,
const char* ExtraCode,
llvm::raw_ostream& OS)
Description
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant as an address. Targets should override this to format as appropriate. This method can return true if the operand is erroneous.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:768
Parameters
- const llvm::MachineInstr* MI
- unsigned int OpNo
- const char* ExtraCode
- llvm::raw_ostream& OS
¶virtual bool PrintAsmOperand(
const llvm::MachineInstr* MI,
unsigned int OpNo,
const char* ExtraCode,
llvm::raw_ostream& OS)
virtual bool PrintAsmOperand(
const llvm::MachineInstr* MI,
unsigned int OpNo,
const char* ExtraCode,
llvm::raw_ostream& OS)
Description
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant. Targets should override this to format as appropriate. This method can return true if the operand is erroneous.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:761
Parameters
- const llvm::MachineInstr* MI
- unsigned int OpNo
- const char* ExtraCode
- llvm::raw_ostream& OS
¶virtual void PrintSpecial(
const llvm::MachineInstr* MI,
llvm::raw_ostream& OS,
llvm::StringRef Code) const
virtual void PrintSpecial(
const llvm::MachineInstr* MI,
llvm::raw_ostream& OS,
llvm::StringRef Code) const
Description
Print information related to the specified machine instr that is independent of the operand, and may be independent of the instr itself. This can be useful for portably encoding the comment character or other bits of target-specific knowledge into the asmstrings. The syntax used is ${:comment}. Targets can override this to add support for their own strange codes.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:751
Parameters
- const llvm::MachineInstr* MI
- llvm::raw_ostream& OS
- llvm::StringRef Code
¶virtual void PrintSymbolOperand(
const llvm::MachineOperand& MO,
llvm::raw_ostream& OS)
virtual void PrintSymbolOperand(
const llvm::MachineOperand& MO,
llvm::raw_ostream& OS)
Description
Print the MachineOperand as a symbol. Targets with complex handling of symbol references should override the base implementation.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:756
Parameters
- const llvm::MachineOperand& MO
- llvm::raw_ostream& OS
¶virtual void SetupMachineFunction(
llvm::MachineFunction& MF)
virtual void SetupMachineFunction(
llvm::MachineFunction& MF)
Description
This should be called when a new MachineFunction is being processed from runOnMachineFunction.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:389
Parameters
¶void addAsmPrinterHandler(
llvm::AsmPrinter::HandlerInfo Handler)
void addAsmPrinterHandler(
llvm::AsmPrinter::HandlerInfo Handler)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:506
Parameters
- llvm::AsmPrinter::HandlerInfo Handler
¶unsigned int addInlineAsmDiagBuffer(
llvm::StringRef AsmStr,
const llvm::MDNode* LocMDNode) const
unsigned int addInlineAsmDiagBuffer(
llvm::StringRef AsmStr,
const llvm::MDNode* LocMDNode) const
Description
Add inline assembly info to the diagnostics machinery, so we can emit file and position info. Returns SrcMgr memory buffer position.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:823
Parameters
- llvm::StringRef AsmStr
- const llvm::MDNode* LocMDNode
¶void computeGlobalGOTEquivs(llvm::Module& M)
void computeGlobalGOTEquivs(llvm::Module& M)
Description
Unnamed constant global variables solely contaning a pointer to another globals variable act like a global variable "proxy", or GOT equivalents, i.e., it's only used to hold the address of the latter. One optimization is to replace accesses to these proxies by using the GOT entry for the final global instead. Hence, we select GOT equivalent candidates among all the module global variables, avoid emitting them unnecessarily and finally replace references to them by pc relative accesses to GOT entries.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:492
Parameters
- llvm::Module& M
¶llvm::MCSymbol* createTempSymbol(
const llvm::Twine& Name) const
llvm::MCSymbol* createTempSymbol(
const llvm::Twine& Name) const
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:578
Parameters
- const llvm::Twine& Name
¶bool doFinalization(llvm::Module& M)
bool doFinalization(llvm::Module& M)
Description
Shut down the asmprinter. If you override this in your pass, you must make sure to call it explicitly.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:374
Parameters
- llvm::Module& M
¶bool doInitialization(llvm::Module& M)
bool doInitialization(llvm::Module& M)
Description
Set up the AsmPrinter when we are working on a new module. If your pass overrides this, it must make sure to explicitly call this implementation.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:370
Parameters
- llvm::Module& M
¶void emitAlignment(
llvm::Align Alignment,
const llvm::GlobalObject* GV = nullptr,
unsigned int MaxBytesToEmit = 0) const
void emitAlignment(
llvm::Align Alignment,
const llvm::GlobalObject* GV = nullptr,
unsigned int MaxBytesToEmit = 0) const
Description
Emit an alignment directive to the specified power of two boundary. If a global value is specified, and if that global has an explicit alignment requested, it will override the alignment request if required for correctness.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:471
Parameters
- llvm::Align Alignment
- const llvm::GlobalObject* GV = nullptr
- unsigned int MaxBytesToEmit = 0
¶void emitBBAddrMapSection(
const llvm::MachineFunction& MF)
void emitBBAddrMapSection(
const llvm::MachineFunction& MF)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:402
Parameters
- const llvm::MachineFunction& MF
¶virtual void emitBasicBlockEnd(
const llvm::MachineBasicBlock& MBB)
virtual void emitBasicBlockEnd(
const llvm::MachineBasicBlock& MBB)
Description
Targets can override this to emit stuff at the end of a basic block.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:537
Parameters
- const llvm::MachineBasicBlock& MBB
¶virtual void emitBasicBlockStart(
const llvm::MachineBasicBlock& MBB)
virtual void emitBasicBlockStart(
const llvm::MachineBasicBlock& MBB)
Description
Targets can override this to emit stuff at the start of a basic block. By default, this method prints the label for the specified MachineBasicBlock, an alignment (if present) and a comment describing it if appropriate.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:534
Parameters
- const llvm::MachineBasicBlock& MBB
¶void emitCFIInstruction(
const llvm::MachineInstr& MI)
void emitCFIInstruction(
const llvm::MachineInstr& MI)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:394
Parameters
- const llvm::MachineInstr& MI
¶void emitCFIInstruction(
const llvm::MCCFIInstruction& Inst) const
void emitCFIInstruction(
const llvm::MCCFIInstruction& Inst) const
Description
Emit frame instruction to describe the layout of the frame.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:721
Parameters
- const llvm::MCCFIInstruction& Inst
¶void emitCallSiteOffset(
const llvm::MCSymbol* Hi,
const llvm::MCSymbol* Lo,
unsigned int Encoding) const
void emitCallSiteOffset(
const llvm::MCSymbol* Hi,
const llvm::MCSymbol* Lo,
unsigned int Encoding) const
Description
Emit reference to a call site with a specified encoding
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:702
Parameters
- const llvm::MCSymbol* Hi
- const llvm::MCSymbol* Lo
- unsigned int Encoding
¶void emitCallSiteValue(
uint64_t Value,
unsigned int Encoding) const
void emitCallSiteValue(
uint64_t Value,
unsigned int Encoding) const
Description
Emit an integer value corresponding to the call site encoding
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:705
Parameters
- uint64_t Value
- unsigned int Encoding
¶virtual void emitConstantPool()
virtual void emitConstantPool()
Description
Print to the current output stream assembly representations of the constants in the constant pool MCP. This is used to print out constants which have been "spilled to memory" by the code generator.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:428
¶virtual void emitDebugValue(
const llvm::MCExpr* Value,
unsigned int Size) const
virtual void emitDebugValue(
const llvm::MCExpr* Value,
unsigned int Size) const
Description
Emit the directive and value for debug thread local expression \p Value - The value to emit.\p Size - The size of the integer (in bytes) to emit.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:714
Parameters
- const llvm::MCExpr* Value
- unsigned int Size
¶void emitDwarfAbbrev(
const llvm::DIEAbbrev& Abbrev) const
void emitDwarfAbbrev(
const llvm::DIEAbbrev& Abbrev) const
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:733
Parameters
- const llvm::DIEAbbrev& Abbrev
¶template <typename T>
void emitDwarfAbbrevs(const T& Abbrevs) const
template <typename T>
void emitDwarfAbbrevs(const T& Abbrevs) const
Description
Emit Dwarf abbreviation table.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:724
Templates
- T
Parameters
- const T& Abbrevs
¶void emitDwarfDIE(const llvm::DIE& Die) const
void emitDwarfDIE(const llvm::DIE& Die) const
Description
Recursively emit Dwarf DIE tree.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:736
Parameters
- const llvm::DIE& Die
¶void emitDwarfLengthOrOffset(uint64_t Value) const
void emitDwarfLengthOrOffset(uint64_t Value) const
Description
Emit 32- or 64-bit value depending on the DWARF format.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:689
Parameters
- uint64_t Value
¶void emitDwarfOffset(const llvm::MCSymbol* Label,
uint64_t Offset) const
void emitDwarfOffset(const llvm::MCSymbol* Label,
uint64_t Offset) const
Description
Emit something like ".long Label + Offset" or ".quad Label + Offset" depending on the DWARF format.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:686
Parameters
- const llvm::MCSymbol* Label
- uint64_t Offset
¶void emitDwarfStringOffset(
llvm::DwarfStringPoolEntryRef S) const
void emitDwarfStringOffset(
llvm::DwarfStringPoolEntryRef S) const
Description
Emit the 4-or 8-byte offset of a string from the start of its section.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:680
Parameters
¶void emitDwarfStringOffset(
llvm::DwarfStringPoolEntry S) const
void emitDwarfStringOffset(
llvm::DwarfStringPoolEntry S) const
Description
Emit the 4- or 8-byte offset of a string from the start of its section. When possible, emit a DwarfStringPool section offset without any relocations, and without using the symbol. Otherwise, defers to \a emitDwarfSymbolReference(). The length of the emitted value depends on the DWARF format.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:677
Parameters
¶void emitDwarfSymbolReference(
const llvm::MCSymbol* Label,
bool ForceOffset = false) const
void emitDwarfSymbolReference(
const llvm::MCSymbol* Label,
bool ForceOffset = false) const
Description
Emit a reference to a symbol for use in dwarf. Different object formats represent this in different ways. Some use a relocation others encode the label offset in its section.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:667
Parameters
- const llvm::MCSymbol* Label
- bool ForceOffset = false
¶void emitDwarfUnitLength(
uint64_t Length,
const llvm::Twine& Comment) const
void emitDwarfUnitLength(
uint64_t Length,
const llvm::Twine& Comment) const
Description
Emit a unit length field. The actual format, DWARF32 or DWARF64, is chosen according to the settings.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:693
Parameters
- uint64_t Length
- const llvm::Twine& Comment
¶llvm::MCSymbol* emitDwarfUnitLength(
const llvm::Twine& Prefix,
const llvm::Twine& Comment) const
llvm::MCSymbol* emitDwarfUnitLength(
const llvm::Twine& Prefix,
const llvm::Twine& Comment) const
Description
Emit a unit length field. The actual format, DWARF32 or DWARF64, is chosen according to the settings. Return the end symbol generated inside, the caller needs to emit it.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:698
Parameters
- const llvm::Twine& Prefix
- const llvm::Twine& Comment
¶void emitEncodingByte(
unsigned int Val,
const char* Desc = nullptr) const
void emitEncodingByte(
unsigned int Val,
const char* Desc = nullptr) const
Description
Emit a .byte 42 directive that corresponds to an encoding. If verbose assembly output is enabled, we output comments describing the encoding. Desc is a string saying what the encoding is specifying (e.g. "LSDA").
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:656
Parameters
- unsigned int Val
- const char* Desc = nullptr
¶virtual void emitEndOfAsmFile(llvm::Module&)
virtual void emitEndOfAsmFile(llvm::Module&)
Description
This virtual method can be overridden by targets that want to emit something at the end of their file.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:520
Parameters
¶void emitFrameAlloc(const llvm::MachineInstr& MI)
void emitFrameAlloc(const llvm::MachineInstr& MI)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:396
Parameters
- const llvm::MachineInstr& MI
¶void emitFunctionBody()
void emitFunctionBody()
Description
This method emits the body and trailer for a function.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:392
¶virtual void emitFunctionBodyEnd()
virtual void emitFunctionBodyEnd()
Description
Targets can override this to emit stuff after the last basic block in the function.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:528
¶virtual void emitFunctionBodyStart()
virtual void emitFunctionBodyStart()
Description
Targets can override this to emit stuff before the first basic block in the function.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:524
¶virtual void emitFunctionDescriptor()
virtual void emitFunctionDescriptor()
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:549
¶virtual void emitFunctionEntryLabel()
virtual void emitFunctionEntryLabel()
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:547
¶virtual void emitFunctionHeader()
virtual void emitFunctionHeader()
Description
This method emits the header for the current function.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:805
¶virtual void emitFunctionHeaderComment()
virtual void emitFunctionHeaderComment()
Description
This method emits a comment next to header for the current function.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:808
¶void emitGlobalAlias(llvm::Module& M,
const llvm::GlobalAlias& GA)
void emitGlobalAlias(llvm::Module& M,
const llvm::GlobalAlias& GA)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:839
Parameters
- llvm::Module& M
- const llvm::GlobalAlias& GA
¶void emitGlobalConstant(
const llvm::DataLayout& DL,
const llvm::Constant* CV,
llvm::AsmPrinter::AliasMapTy* AliasList =
nullptr)
void emitGlobalConstant(
const llvm::DataLayout& DL,
const llvm::Constant* CV,
llvm::AsmPrinter::AliasMapTy* AliasList =
nullptr)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:481
Parameters
- const llvm::DataLayout& DL
- const llvm::Constant* CV
- llvm::AsmPrinter::AliasMapTy* AliasList = nullptr
¶void emitGlobalGOTEquivs()
void emitGlobalGOTEquivs()
Description
Constant expressions using GOT equivalent globals may not be eligible for PC relative GOT entry conversion, in such cases we need to emit the proxies we previously omitted in EmitGlobalVariable.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:497
¶void emitGlobalIFunc(llvm::Module& M,
const llvm::GlobalIFunc& GI)
void emitGlobalIFunc(llvm::Module& M,
const llvm::GlobalIFunc& GI)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:840
Parameters
- llvm::Module& M
- const llvm::GlobalIFunc& GI
¶virtual void emitGlobalVariable(
const llvm::GlobalVariable* GV)
virtual void emitGlobalVariable(
const llvm::GlobalVariable* GV)
Description
Emit the specified global variable to the .s file.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:435
Parameters
- const llvm::GlobalVariable* GV
¶virtual void emitImplicitDef(
const llvm::MachineInstr* MI) const
virtual void emitImplicitDef(
const llvm::MachineInstr* MI) const
Description
Targets can override this to customize the output of IMPLICIT_DEF instructions in verbose mode.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:569
Parameters
- const llvm::MachineInstr* MI
¶void emitInitialRawDwarfLocDirective(
const llvm::MachineFunction& MF)
void emitInitialRawDwarfLocDirective(
const llvm::MachineFunction& MF)
Description
Emits inital debug location directive.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:305
Parameters
- const llvm::MachineFunction& MF
¶void emitInlineAsm(
llvm::StringRef Str,
const llvm::MCSubtargetInfo& STI,
const llvm::MCTargetOptions& MCOptions,
const llvm::MDNode* LocMDNode = nullptr,
InlineAsm::AsmDialect AsmDialect =
InlineAsm::AD_ATT) const
void emitInlineAsm(
llvm::StringRef Str,
const llvm::MCSubtargetInfo& STI,
const llvm::MCTargetOptions& MCOptions,
const llvm::MDNode* LocMDNode = nullptr,
InlineAsm::AsmDialect AsmDialect =
InlineAsm::AD_ATT) const
Description
Emit a blob of inline asm to the output streamer.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:812
Parameters
- llvm::StringRef Str
- const llvm::MCSubtargetInfo& STI
- const llvm::MCTargetOptions& MCOptions
- const llvm::MDNode* LocMDNode = nullptr
- InlineAsm::AsmDialect AsmDialect = InlineAsm::AD_ATT
¶void emitInlineAsm(
const llvm::MachineInstr* MI) const
void emitInlineAsm(
const llvm::MachineInstr* MI) const
Description
This method formats and emits the specified machine instruction that is an inline asm.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:819
Parameters
- const llvm::MachineInstr* MI
¶virtual void emitInlineAsmEnd(
const llvm::MCSubtargetInfo& StartInfo,
const llvm::MCSubtargetInfo* EndInfo) const
virtual void emitInlineAsmEnd(
const llvm::MCSubtargetInfo& StartInfo,
const llvm::MCSubtargetInfo* EndInfo) const
Description
Let the target do anything it needs to do after emitting inlineasm. This callback can be used restore the original mode in case the inlineasm contains directives to switch modes.\p StartInfo - the original subtarget info before inline asm\p EndInfo - the final subtarget info after parsing the inline asm, or NULL if the value is unknown.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:781
Parameters
- const llvm::MCSubtargetInfo& StartInfo
- const llvm::MCSubtargetInfo* EndInfo
¶virtual void emitInlineAsmStart() const
virtual void emitInlineAsmStart() const
Description
Let the target do anything it needs to do before emitting inlineasm.\p StartInfo - the subtarget info before parsing inline asm
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:773
¶virtual void emitInstruction(
const llvm::MachineInstr*)
virtual void emitInstruction(
const llvm::MachineInstr*)
Description
Targets should implement this to emit instructions.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:540
Parameters
- const llvm::MachineInstr*
¶void emitInt16(int Value) const
void emitInt16(int Value) const
Description
Emit a short directive and value.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:611
Parameters
- int Value
¶void emitInt32(int Value) const
void emitInt32(int Value) const
Description
Emit a long directive and value.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:614
Parameters
- int Value
¶void emitInt64(uint64_t Value) const
void emitInt64(uint64_t Value) const
Description
Emit a long long directive and value.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:617
Parameters
- uint64_t Value
¶void emitInt8(int Value) const
void emitInt8(int Value) const
Description
Emit a byte directive and value.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:608
Parameters
- int Value
¶void emitJumpTableEntry(
const llvm::MachineJumpTableInfo* MJTI,
const llvm::MachineBasicBlock* MBB,
unsigned int uid) const
void emitJumpTableEntry(
const llvm::MachineJumpTableInfo* MJTI,
const llvm::MachineBasicBlock* MBB,
unsigned int uid) const
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:830
Parameters
- const llvm::MachineJumpTableInfo* MJTI
- const llvm::MachineBasicBlock* MBB
- unsigned int uid
¶virtual void emitJumpTableInfo()
virtual void emitJumpTableInfo()
Description
Print assembly representations of the jump tables used by the current function to the current output stream.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:432
¶void emitLLVMUsedList(
const llvm::ConstantArray* InitList)
void emitLLVMUsedList(
const llvm::ConstantArray* InitList)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:832
Parameters
- const llvm::ConstantArray* InitList
¶void emitLabelDifference(const llvm::MCSymbol* Hi,
const llvm::MCSymbol* Lo,
unsigned int Size) const
void emitLabelDifference(const llvm::MCSymbol* Hi,
const llvm::MCSymbol* Lo,
unsigned int Size) const
Description
Emit something like ".long Hi-Lo" where the size in bytes of the directive is specified by Size and Hi/Lo specify the labels. This implicitly uses .set if it is available.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:622
Parameters
- const llvm::MCSymbol* Hi
- const llvm::MCSymbol* Lo
- unsigned int Size
¶void emitLabelDifferenceAsULEB128(
const llvm::MCSymbol* Hi,
const llvm::MCSymbol* Lo) const
void emitLabelDifferenceAsULEB128(
const llvm::MCSymbol* Hi,
const llvm::MCSymbol* Lo) const
Description
Emit something like ".uleb128 Hi-Lo".
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:626
Parameters
- const llvm::MCSymbol* Hi
- const llvm::MCSymbol* Lo
¶void emitLabelPlusOffset(
const llvm::MCSymbol* Label,
uint64_t Offset,
unsigned int Size,
bool IsSectionRelative = false) const
void emitLabelPlusOffset(
const llvm::MCSymbol* Label,
uint64_t Offset,
unsigned int Size,
bool IsSectionRelative = false) const
Description
Emit something like ".long Label+Offset" where the size in bytes of the directive is specified by Size and Label specifies the label. This implicitly uses .set if it is available.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:632
Parameters
- const llvm::MCSymbol* Label
- uint64_t Offset
- unsigned int Size
- bool IsSectionRelative = false
¶void emitLabelReference(
const llvm::MCSymbol* Label,
unsigned int Size,
bool IsSectionRelative = false) const
void emitLabelReference(
const llvm::MCSymbol* Label,
unsigned int Size,
bool IsSectionRelative = false) const
Description
Emit something like ".long Label" where the size in bytes of the directive is specified by Size and Label specifies the label.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:637
Parameters
- const llvm::MCSymbol* Label
- unsigned int Size
- bool IsSectionRelative = false
¶virtual void emitLinkage(
const llvm::GlobalValue* GV,
llvm::MCSymbol* GVSym) const
virtual void emitLinkage(
const llvm::GlobalValue* GV,
llvm::MCSymbol* GVSym) const
Description
This emits linkage information about \p GVSym based on \p GV, if this is supported by the target.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:791
Parameters
- const llvm::GlobalValue* GV
- llvm::MCSymbol* GVSym
¶virtual void emitMachineConstantPoolValue(
llvm::MachineConstantPoolValue* MCPV)
virtual void emitMachineConstantPoolValue(
llvm::MachineConstantPoolValue* MCPV)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:553
Parameters
¶void emitModuleCommandLines(llvm::Module& M)
void emitModuleCommandLines(llvm::Module& M)
Description
Emit bytes for llvm.commandline metadata.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:836
Parameters
- llvm::Module& M
¶void emitModuleIdents(llvm::Module& M)
void emitModuleIdents(llvm::Module& M)
Description
Emit llvm.ident metadata in an '.ident' directive.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:834
Parameters
- llvm::Module& M
¶void emitNops(unsigned int N)
void emitNops(unsigned int N)
Description
Emit N NOP instructions.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:572
Parameters
- unsigned int N
¶void emitPatchableFunctionEntries()
void emitPatchableFunctionEntries()
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:359
¶void emitPseudoProbe(const llvm::MachineInstr& MI)
void emitPseudoProbe(const llvm::MachineInstr& MI)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:404
Parameters
- const llvm::MachineInstr& MI
¶void emitRemarksSection(
remarks::RemarkStreamer& RS)
void emitRemarksSection(
remarks::RemarkStreamer& RS)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:406
Parameters
¶void emitSLEB128(int64_t Value,
const char* Desc = nullptr) const
void emitSLEB128(int64_t Value,
const char* Desc = nullptr) const
Description
Emit the specified signed leb128 value.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:647
Parameters
- int64_t Value
- const char* Desc = nullptr
¶bool emitSpecialLLVMGlobal(
const llvm::GlobalVariable* GV)
bool emitSpecialLLVMGlobal(
const llvm::GlobalVariable* GV)
Description
Check to see if the specified global is a special global used by LLVM. If so, emit it and return true, otherwise do nothing and return false.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:439
Parameters
- const llvm::GlobalVariable* GV
¶void emitStackMaps(llvm::StackMaps& SM)
void emitStackMaps(llvm::StackMaps& SM)
Description
Emit the stack maps.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:500
Parameters
- llvm::StackMaps& SM
¶void emitStackSizeSection(
const llvm::MachineFunction& MF)
void emitStackSizeSection(
const llvm::MachineFunction& MF)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:398
Parameters
- const llvm::MachineFunction& MF
¶void emitStackUsage(
const llvm::MachineFunction& MF)
void emitStackUsage(
const llvm::MachineFunction& MF)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:400
Parameters
- const llvm::MachineFunction& MF
¶virtual void emitStartOfAsmFile(llvm::Module&)
virtual void emitStartOfAsmFile(llvm::Module&)
Description
This virtual method can be overridden by targets that want to emit something at the start of their file.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:516
Parameters
¶virtual void emitTTypeReference(
const llvm::GlobalValue* GV,
unsigned int Encoding)
virtual void emitTTypeReference(
const llvm::GlobalValue* GV,
unsigned int Encoding)
Description
Emit reference to a ttype global with a specified encoding.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:662
Parameters
- const llvm::GlobalValue* GV
- unsigned int Encoding
¶void emitULEB128(uint64_t Value,
const char* Desc = nullptr,
unsigned int PadTo = 0) const
void emitULEB128(uint64_t Value,
const char* Desc = nullptr,
unsigned int PadTo = 0) const
Description
Emit the specified unsigned leb128 value.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:650
Parameters
- uint64_t Value
- const char* Desc = nullptr
- unsigned int PadTo = 0
¶void emitVisibility(
llvm::MCSymbol* Sym,
unsigned int Visibility,
bool IsDefinition = true) const
void emitVisibility(
llvm::MCSymbol* Sym,
unsigned int Visibility,
bool IsDefinition = true) const
Description
This emits visibility information about symbol, if this is supported by the target.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:786
Parameters
- llvm::MCSymbol* Sym
- unsigned int Visibility
- bool IsDefinition = true
¶void emitXRayTable()
void emitXRayTable()
Description
Emit a table with all XRay instrumentation points.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:357
¶virtual void emitXXStructor(
const llvm::DataLayout& DL,
const llvm::Constant* CV)
virtual void emitXXStructor(
const llvm::DataLayout& DL,
const llvm::Constant* CV)
Description
Targets can override this to change how global constants that are part of a C++ static/global constructor list are emitted.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:557
Parameters
- const llvm::DataLayout& DL
- const llvm::Constant* CV
¶virtual void emitXXStructorList(
const llvm::DataLayout& DL,
const llvm::Constant* List,
bool IsCtor)
virtual void emitXXStructorList(
const llvm::DataLayout& DL,
const llvm::Constant* List,
bool IsCtor)
Description
This method emits `llvm.global_ctors` or `llvm.global_dtors` list.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:464
Parameters
- const llvm::DataLayout& DL
- const llvm::Constant* List
- bool IsCtor
¶llvm::MCSymbol* getAddrLabelSymbol(
const llvm::BasicBlock* BB)
llvm::MCSymbol* getAddrLabelSymbol(
const llvm::BasicBlock* BB)
Description
Return the symbol to be used for the specified basic block when its address is taken. This cannot be its normal LBB label because the block may be accessed outside its containing function.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:274
Parameters
- const llvm::BasicBlock* BB
¶ArrayRef<llvm::MCSymbol*>
getAddrLabelSymbolToEmit(
const llvm::BasicBlock* BB)
ArrayRef<llvm::MCSymbol*>
getAddrLabelSymbolToEmit(
const llvm::BasicBlock* BB)
Description
Return the symbol to be used for the specified basic block when its address is taken. If other blocks were RAUW'd to this one, we may have to emit them as well, return the whole set.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:281
Parameters
- const llvm::BasicBlock* BB
¶void getAnalysisUsage(
llvm::AnalysisUsage& AU) const
void getAnalysisUsage(
llvm::AnalysisUsage& AU) const
Description
Record analysis usage.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:366
Parameters
¶const llvm::MCSection* getCurrentSection() const
const llvm::MCSection* getCurrentSection() const
Description
Return the current section we are emitting to.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:308
¶const llvm::DataLayout& getDataLayout() const
const llvm::DataLayout& getDataLayout() const
Description
Return information about data layout.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:294
¶llvm::DwarfDebug* getDwarfDebug() const
llvm::DwarfDebug* getDwarfDebug() const
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:236
¶llvm::DwarfDebug* getDwarfDebug()
llvm::DwarfDebug* getDwarfDebug()
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:235
¶dwarf::FormParams getDwarfFormParams() const
dwarf::FormParams getDwarfFormParams() const
Description
Returns information about the byte size of DW_FORM values.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:250
¶unsigned int getDwarfOffsetByteSize() const
unsigned int getDwarfOffsetByteSize() const
Description
Returns 4 for DWARF32 and 8 for DWARF64.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:244
¶uint16_t getDwarfVersion() const
uint16_t getDwarfVersion() const
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:238
¶llvm::MCSymbol* getFunctionBegin() const
llvm::MCSymbol* getFunctionBegin() const
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:264
¶llvm::AsmPrinter::CFISection
getFunctionCFISectionType(
const llvm::Function& F) const
llvm::AsmPrinter::CFISection
getFunctionCFISectionType(
const llvm::Function& F) const
Description
Get the CFISection type for a function.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:409
Parameters
- const llvm::Function& F
¶llvm::AsmPrinter::CFISection
getFunctionCFISectionType(
const llvm::MachineFunction& MF) const
llvm::AsmPrinter::CFISection
getFunctionCFISectionType(
const llvm::MachineFunction& MF) const
Description
Get the CFISection type for a function.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:412
Parameters
- const llvm::MachineFunction& MF
¶llvm::MCSymbol* getFunctionEnd() const
llvm::MCSymbol* getFunctionEnd() const
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:265
¶virtual const llvm::MCSymbol*
getFunctionFrameSymbol() const
virtual const llvm::MCSymbol*
getFunctionFrameSymbol() const
Description
Return symbol for the function pseudo stack if the stack frame is not a register based.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:262
¶unsigned int getFunctionNumber() const
unsigned int getFunctionNumber() const
Description
Return a unique ID for the current function.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:258
¶static llvm::Align getGVAlignment(
const llvm::GlobalObject* GV,
const llvm::DataLayout& DL,
llvm::Align InAlign = llvm::Align(1))
static llvm::Align getGVAlignment(
const llvm::GlobalObject* GV,
const llvm::DataLayout& DL,
llvm::Align InAlign = llvm::Align(1))
Description
Return the alignment for the specified \p GV.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:794
Parameters
- const llvm::GlobalObject* GV
- const llvm::DataLayout& DL
- llvm::Align InAlign = llvm::Align(1)
¶virtual unsigned int getISAEncoding()
virtual unsigned int getISAEncoding()
Description
Get the value for DW_AT_APPLE_isa. Zero if no isa encoding specified.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:708
¶llvm::MCSymbol* getMBBExceptionSym(
const llvm::MachineBasicBlock& MBB)
llvm::MCSymbol* getMBBExceptionSym(
const llvm::MachineBasicBlock& MBB)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:269
Parameters
- const llvm::MachineBasicBlock& MBB
¶llvm::AsmPrinter::CFISection
getModuleCFISectionType() const
llvm::AsmPrinter::CFISection
getModuleCFISectionType() const
Description
Get the CFISection type for the module.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:415
¶void getNameWithPrefix(
SmallVectorImpl<char>& Name,
const llvm::GlobalValue* GV) const
void getNameWithPrefix(
SmallVectorImpl<char>& Name,
const llvm::GlobalValue* GV) const
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:310
Parameters
- SmallVectorImpl<char>& Name
- const llvm::GlobalValue* GV
¶const llvm::TargetLoweringObjectFile&
getObjFileLowering() const
const llvm::TargetLoweringObjectFile&
getObjFileLowering() const
Description
Return information about object file lowering.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:291
¶unsigned int getPointerSize() const
unsigned int getPointerSize() const
Description
Return the pointer size from the TargetMachine
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:297
¶const llvm::MCSubtargetInfo& getSubtargetInfo()
const
const llvm::MCSubtargetInfo& getSubtargetInfo()
const
Description
Return information about subtarget.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:300
¶llvm::MCSymbol* getSymbol(
const llvm::GlobalValue* GV) const
llvm::MCSymbol* getSymbol(
const llvm::GlobalValue* GV) const
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:313
Parameters
- const llvm::GlobalValue* GV
¶llvm::MCSymbol* getSymbolPreferLocal(
const llvm::GlobalValue& GV) const
llvm::MCSymbol* getSymbolPreferLocal(
const llvm::GlobalValue& GV) const
Description
Similar to getSymbol() but preferred for references. On ELF, this uses a local symbol if a reference to GV is guaranteed to be resolved to the definition in the same module.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:318
Parameters
- const llvm::GlobalValue& GV
¶llvm::MCSymbol* getSymbolWithGlobalValueBase(
const llvm::GlobalValue* GV,
llvm::StringRef Suffix) const
llvm::MCSymbol* getSymbolWithGlobalValueBase(
const llvm::GlobalValue* GV,
llvm::StringRef Suffix) const
Description
Return the MCSymbol for a private symbol with global value name as its base, with the specified suffix.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:582
Parameters
- const llvm::GlobalValue* GV
- llvm::StringRef Suffix
¶unsigned int getUnitLengthFieldByteSize() const
unsigned int getUnitLengthFieldByteSize() const
Description
Returns 4 for DWARF32 and 12 for DWARF64.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:247
¶virtual bool isBlockOnlyReachableByFallthrough(
const llvm::MachineBasicBlock* MBB) const
virtual bool isBlockOnlyReachableByFallthrough(
const llvm::MachineBasicBlock* MBB) const
Description
Return true if the basic block has exactly one predecessor and the control transfer mechanism between the predecessor and this block is a fall-through.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:565
Parameters
- const llvm::MachineBasicBlock* MBB
¶bool isDwarf64() const
bool isDwarf64() const
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:241
¶bool isPositionIndependent() const
bool isPositionIndependent() const
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:252
¶bool isVerbose() const
bool isVerbose() const
Description
Return true if assembly output should contain comments.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:255
¶virtual const llvm::MCExpr* lowerConstant(
const llvm::Constant* CV)
virtual const llvm::MCExpr* lowerConstant(
const llvm::Constant* CV)
Description
Lower the specified LLVM Constant to an MCExpr.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:475
Parameters
- const llvm::Constant* CV
¶bool needsCFIForDebug() const
bool needsCFIForDebug() const
Description
Since emitting CFI unwind information is entangled with supporting the exceptions, this returns true for platforms which use CFI unwind information for debugging purpose when `MCAsmInfo::ExceptionsType == ExceptionHandling::None`.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:423
¶bool needsSEHMoves()
bool needsSEHMoves()
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:417
¶void preprocessXXStructorList(
const llvm::DataLayout& DL,
const llvm::Constant* List,
SmallVector<llvm::AsmPrinter::Structor, 8>&
Structors)
void preprocessXXStructorList(
const llvm::DataLayout& DL,
const llvm::Constant* List,
SmallVector<llvm::AsmPrinter::Structor, 8>&
Structors)
Description
This method gathers an array of Structors and then sorts them out by Priority.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:460
Parameters
- const llvm::DataLayout& DL
- const llvm::Constant* List
- The initializer of `llvm.global_ctors` or `llvm.global_dtors` array.
- SmallVector<llvm::AsmPrinter::Structor, 8>& Structors
- Sorted Structor structs by Priority.
¶void printOffset(int64_t Offset,
llvm::raw_ostream& OS) const
void printOffset(int64_t Offset,
llvm::raw_ostream& OS) const
Description
This is just convenient handler for printing offsets.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:605
Parameters
- int64_t Offset
- llvm::raw_ostream& OS
¶void recordSled(llvm::MCSymbol* Sled,
const llvm::MachineInstr& MI,
llvm::AsmPrinter::SledKind Kind,
uint8_t Version = 0)
void recordSled(llvm::MCSymbol* Sled,
const llvm::MachineInstr& MI,
llvm::AsmPrinter::SledKind Kind,
uint8_t Version = 0)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:353
Parameters
- llvm::MCSymbol* Sled
- const llvm::MachineInstr& MI
- llvm::AsmPrinter::SledKind Kind
- uint8_t Version = 0
¶bool runOnMachineFunction(
llvm::MachineFunction& MF)
bool runOnMachineFunction(
llvm::MachineFunction& MF)
Description
Emit the specified function out to the OutStreamer.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:377
Parameters
¶void setDwarfVersion(uint16_t Version)
void setDwarfVersion(uint16_t Version)
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:239
Parameters
- uint16_t Version
¶bool shouldEmitLabelForBasicBlock(
const llvm::MachineBasicBlock& MBB) const
bool shouldEmitLabelForBasicBlock(
const llvm::MachineBasicBlock& MBB) const
Description
This method decides whether the specified basic block requires a label.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:843
Parameters
- const llvm::MachineBasicBlock& MBB
¶virtual bool
shouldEmitWeakSwiftAsyncExtendedFramePointerFlags()
const
virtual bool
shouldEmitWeakSwiftAsyncExtendedFramePointerFlags()
const
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:846
¶void takeDeletedSymbolsForFunction(
const llvm::Function* F,
std::vector<MCSymbol*>& Result)
void takeDeletedSymbolsForFunction(
const llvm::Function* F,
std::vector<MCSymbol*>& Result)
Description
If the specified function has had any references to address-taken blocks generated, but the block got deleted, return the symbol now so we can emit it. This prevents emitting a reference to a symbol that has no definition.
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:287
Parameters
- const llvm::Function* F
- std::vector<MCSymbol*>& Result
¶~AsmPrinter()
~AsmPrinter()
Declared at: llvm/include/llvm/CodeGen/AsmPrinter.h:233