LLVM 20.0.0git
|
This class is intended to be used as a driving class for all asm writers. More...
#include "llvm/CodeGen/AsmPrinter.h"
Classes | |
struct | MBBSectionRange |
Map a basic block section ID to the begin and end symbols of that section which determine the section's range. More... | |
struct | Structor |
llvm.global_ctors and llvm.global_dtors are arrays of Structor structs. More... | |
struct | XRayFunctionEntry |
Public Types | |
enum class | CFISection : unsigned { None = 0 , EH = 1 , Debug = 2 } |
enum class | SledKind : uint8_t { FUNCTION_ENTER = 0 , FUNCTION_EXIT = 1 , TAIL_CALL = 2 , LOG_ARGS_ENTER = 3 , CUSTOM_EVENT = 4 , TYPED_EVENT = 5 } |
using | GOTEquivUsePair = std::pair< const GlobalVariable *, unsigned > |
Map global GOT equivalent MCSymbols to GlobalVariables and keep track of its number of uses by other globals. | |
using | AliasMapTy = DenseMap< uint64_t, SmallVector< const GlobalAlias *, 1 > > |
Print a general LLVM constant to the .s file. | |
Public Member Functions | |
~AsmPrinter () override | |
DwarfDebug * | getDwarfDebug () |
DwarfDebug * | getDwarfDebug () const |
uint16_t | getDwarfVersion () const |
void | setDwarfVersion (uint16_t Version) |
bool | isDwarf64 () const |
unsigned int | getDwarfOffsetByteSize () const |
Returns 4 for DWARF32 and 8 for DWARF64. | |
unsigned int | getUnitLengthFieldByteSize () const |
Returns 4 for DWARF32 and 12 for DWARF64. | |
dwarf::FormParams | getDwarfFormParams () const |
Returns information about the byte size of DW_FORM values. | |
bool | isPositionIndependent () const |
bool | isVerbose () const |
Return true if assembly output should contain comments. | |
unsigned | getFunctionNumber () const |
Return a unique ID for the current function. | |
virtual const MCSymbol * | getFunctionFrameSymbol () const |
Return symbol for the function pseudo stack if the stack frame is not a register based. | |
MCSymbol * | getFunctionBegin () const |
MCSymbol * | getFunctionEnd () const |
MCSymbol * | getMBBExceptionSym (const MachineBasicBlock &MBB) |
MCSymbol * | getAddrLabelSymbol (const BasicBlock *BB) |
Return the symbol to be used for the specified basic block when its address is taken. | |
ArrayRef< MCSymbol * > | getAddrLabelSymbolToEmit (const BasicBlock *BB) |
Return the symbol to be used for the specified basic block when its address is taken. | |
void | takeDeletedSymbolsForFunction (const Function *F, std::vector< MCSymbol * > &Result) |
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. | |
const TargetLoweringObjectFile & | getObjFileLowering () const |
Return information about object file lowering. | |
const DataLayout & | getDataLayout () const |
Return information about data layout. | |
unsigned | getPointerSize () const |
Return the pointer size from the TargetMachine. | |
const MCSubtargetInfo & | getSubtargetInfo () const |
Return information about subtarget. | |
void | EmitToStreamer (MCStreamer &S, const MCInst &Inst) |
void | emitInitialRawDwarfLocDirective (const MachineFunction &MF) |
Emits inital debug location directive. | |
const MCSection * | getCurrentSection () const |
Return the current section we are emitting to. | |
void | getNameWithPrefix (SmallVectorImpl< char > &Name, const GlobalValue *GV) const |
MCSymbol * | getSymbol (const GlobalValue *GV) const |
MCSymbol * | getSymbolPreferLocal (const GlobalValue &GV) const |
Similar to getSymbol() but preferred for references. | |
bool | doesDwarfUseRelocationsAcrossSections () const |
void | setDwarfUsesRelocationsAcrossSections (bool Enable) |
void | recordSled (MCSymbol *Sled, const MachineInstr &MI, SledKind Kind, uint8_t Version=0) |
void | emitXRayTable () |
Emit a table with all XRay instrumentation points. | |
void | emitPatchableFunctionEntries () |
void | getAnalysisUsage (AnalysisUsage &AU) const override |
Record analysis usage. | |
bool | doInitialization (Module &M) override |
Set up the AsmPrinter when we are working on a new module. | |
bool | doFinalization (Module &M) override |
Shut down the asmprinter. | |
bool | runOnMachineFunction (MachineFunction &MF) override |
Emit the specified function out to the OutStreamer. | |
virtual void | SetupMachineFunction (MachineFunction &MF) |
This should be called when a new MachineFunction is being processed from runOnMachineFunction. | |
void | emitFunctionBody () |
This method emits the body and trailer for a function. | |
void | emitCFIInstruction (const MachineInstr &MI) |
void | emitFrameAlloc (const MachineInstr &MI) |
void | emitStackSizeSection (const MachineFunction &MF) |
void | emitStackUsage (const MachineFunction &MF) |
void | emitBBAddrMapSection (const MachineFunction &MF) |
void | emitKCFITrapEntry (const MachineFunction &MF, const MCSymbol *Symbol) |
virtual void | emitKCFITypeId (const MachineFunction &MF) |
void | emitPseudoProbe (const MachineInstr &MI) |
void | emitRemarksSection (remarks::RemarkStreamer &RS) |
void | emitPCSectionsLabel (const MachineFunction &MF, const MDNode &MD) |
Emits a label as reference for PC sections. | |
void | emitPCSections (const MachineFunction &MF) |
Emits the PC sections collected from instructions. | |
CFISection | getFunctionCFISectionType (const Function &F) const |
Get the CFISection type for a function. | |
CFISection | getFunctionCFISectionType (const MachineFunction &MF) const |
Get the CFISection type for a function. | |
CFISection | getModuleCFISectionType () const |
Get the CFISection type for the module. | |
bool | hasDebugInfo () const |
Returns true if valid debug info is present. | |
bool | needsSEHMoves () |
bool | usesCFIWithoutEH () const |
Since emitting CFI unwind information is entangled with supporting the exceptions, this returns true for platforms which use CFI unwind information for other purposes (debugging, sanitizers, ...) when MCAsmInfo::ExceptionsType == ExceptionHandling::None . | |
virtual void | emitConstantPool () |
Print to the current output stream assembly representations of the constants in the constant pool MCP. | |
virtual void | emitJumpTableInfo () |
Print assembly representations of the jump tables used by the current function to the current output stream. | |
virtual void | emitGlobalVariable (const GlobalVariable *GV) |
Emit the specified global variable to the .s file. | |
bool | emitSpecialLLVMGlobal (const GlobalVariable *GV) |
Check to see if the specified global is a special global used by LLVM. | |
void | preprocessXXStructorList (const DataLayout &DL, const Constant *List, SmallVector< Structor, 8 > &Structors) |
This method gathers an array of Structors and then sorts them out by Priority. | |
virtual void | emitXXStructorList (const DataLayout &DL, const Constant *List, bool IsCtor) |
This method emits llvm.global_ctors or llvm.global_dtors list. | |
void | emitAlignment (Align Alignment, const GlobalObject *GV=nullptr, unsigned MaxBytesToEmit=0) const |
Emit an alignment directive to the specified power of two boundary. | |
virtual const MCExpr * | lowerConstant (const Constant *CV) |
Lower the specified LLVM Constant to an MCExpr. | |
void | emitGlobalConstant (const DataLayout &DL, const Constant *CV, AliasMapTy *AliasList=nullptr) |
EmitGlobalConstant - Print a general LLVM constant to the .s file. | |
void | computeGlobalGOTEquivs (Module &M) |
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. | |
void | emitGlobalGOTEquivs () |
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. | |
void | emitStackMaps () |
Emit the stack maps. | |
void | addAsmPrinterHandler (std::unique_ptr< AsmPrinterHandler > Handler) |
void | addDebugHandler (std::unique_ptr< DebugHandlerBase > Handler) |
virtual void | emitStartOfAsmFile (Module &) |
This virtual method can be overridden by targets that want to emit something at the start of their file. | |
virtual void | emitEndOfAsmFile (Module &) |
This virtual method can be overridden by targets that want to emit something at the end of their file. | |
virtual void | emitFunctionBodyStart () |
Targets can override this to emit stuff before the first basic block in the function. | |
virtual void | emitFunctionBodyEnd () |
Targets can override this to emit stuff after the last basic block in the function. | |
virtual void | emitBasicBlockStart (const MachineBasicBlock &MBB) |
Targets can override this to emit stuff at the start of a basic block. | |
virtual void | emitBasicBlockEnd (const MachineBasicBlock &MBB) |
Targets can override this to emit stuff at the end of a basic block. | |
virtual void | emitInstruction (const MachineInstr *) |
Targets should implement this to emit instructions. | |
virtual MCSymbol * | GetCPISymbol (unsigned CPID) const |
Return the symbol for the specified constant pool entry. | |
virtual void | emitFunctionEntryLabel () |
EmitFunctionEntryLabel - Emit the label that is the entrypoint for the function. | |
virtual void | emitFunctionDescriptor () |
virtual void | emitMachineConstantPoolValue (MachineConstantPoolValue *MCPV) |
virtual void | emitXXStructor (const DataLayout &DL, const Constant *CV) |
Targets can override this to change how global constants that are part of a C++ static/global constructor list are emitted. | |
virtual const MCExpr * | lowerConstantPtrAuth (const ConstantPtrAuth &CPA) |
virtual const MCExpr * | lowerBlockAddressConstant (const BlockAddress &BA) |
Lower the specified BlockAddress to an MCExpr. | |
virtual bool | isBlockOnlyReachableByFallthrough (const MachineBasicBlock *MBB) const |
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. | |
virtual void | emitImplicitDef (const MachineInstr *MI) const |
Targets can override this to customize the output of IMPLICIT_DEF instructions in verbose mode. | |
virtual const MCSubtargetInfo * | getIFuncMCSubtargetInfo () const |
getSubtargetInfo() cannot be used where this is needed because we don't have a MachineFunction when we're lowering a GlobalIFunc, and getSubtargetInfo requires one. | |
virtual void | emitMachOIFuncStubBody (Module &M, const GlobalIFunc &GI, MCSymbol *LazyPointer) |
virtual void | emitMachOIFuncStubHelperBody (Module &M, const GlobalIFunc &GI, MCSymbol *LazyPointer) |
void | emitNops (unsigned N) |
Emit N NOP instructions. | |
MCSymbol * | createTempSymbol (const Twine &Name) const |
MCSymbol * | getSymbolWithGlobalValueBase (const GlobalValue *GV, StringRef Suffix) const |
Return the MCSymbol for a private symbol with global value name as its base, with the specified suffix. | |
MCSymbol * | GetExternalSymbolSymbol (Twine Sym) const |
Return the MCSymbol for the specified ExternalSymbol. | |
MCSymbol * | GetJTISymbol (unsigned JTID, bool isLinkerPrivate=false) const |
Return the symbol for the specified jump table entry. | |
MCSymbol * | GetJTSetSymbol (unsigned UID, unsigned MBBID) const |
Return the symbol for the specified jump table .set FIXME: privatize to AsmPrinter. | |
MCSymbol * | GetBlockAddressSymbol (const BlockAddress *BA) const |
Return the MCSymbol used to satisfy BlockAddress uses of the specified basic block. | |
MCSymbol * | GetBlockAddressSymbol (const BasicBlock *BB) const |
void | printOffset (int64_t Offset, raw_ostream &OS) const |
This is just convenient handler for printing offsets. | |
void | emitInt8 (int Value) const |
Emit a byte directive and value. | |
void | emitInt16 (int Value) const |
Emit a short directive and value. | |
void | emitInt32 (int Value) const |
Emit a long directive and value. | |
void | emitInt64 (uint64_t Value) const |
Emit a long long directive and value. | |
void | emitSLEB128 (int64_t Value, const char *Desc=nullptr) const |
Emit the specified signed leb128 value. | |
void | emitULEB128 (uint64_t Value, const char *Desc=nullptr, unsigned PadTo=0) const |
Emit the specified unsigned leb128 value. | |
void | emitLabelDifference (const MCSymbol *Hi, const MCSymbol *Lo, unsigned Size) const |
Emit something like ".long Hi-Lo" where the size in bytes of the directive is specified by Size and Hi/Lo specify the labels. | |
void | emitLabelDifferenceAsULEB128 (const MCSymbol *Hi, const MCSymbol *Lo) const |
Emit something like ".uleb128 Hi-Lo". | |
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 Size and Label specifies the label. | |
void | emitLabelReference (const MCSymbol *Label, unsigned Size, bool IsSectionRelative=false) const |
Emit something like ".long Label" where the size in bytes of the directive is specified by Size and Label specifies the label. | |
void | emitEncodingByte (unsigned Val, const char *Desc=nullptr) const |
Emit a .byte 42 directive that corresponds to an encoding. | |
unsigned | GetSizeOfEncodedValue (unsigned Encoding) const |
Return the size of the encoding in bytes. | |
virtual void | emitTTypeReference (const GlobalValue *GV, unsigned Encoding) |
Emit reference to a ttype global with a specified encoding. | |
void | emitDwarfSymbolReference (const MCSymbol *Label, bool ForceOffset=false) const |
Emit a reference to a symbol for use in dwarf. | |
void | emitDwarfStringOffset (DwarfStringPoolEntry S) const |
Emit the 4- or 8-byte offset of a string from the start of its section. | |
void | emitDwarfStringOffset (DwarfStringPoolEntryRef S) const |
Emit the 4-or 8-byte offset of a string from the start of its section. | |
void | emitDwarfOffset (const MCSymbol *Label, uint64_t Offset) const |
Emit something like ".long Label + Offset" or ".quad Label + Offset" depending on the DWARF format. | |
void | emitDwarfLengthOrOffset (uint64_t Value) const |
Emit 32- or 64-bit value depending on the DWARF format. | |
void | emitDwarfUnitLength (uint64_t Length, const Twine &Comment) const |
Emit a unit length field. | |
MCSymbol * | emitDwarfUnitLength (const Twine &Prefix, const Twine &Comment) const |
Emit a unit length field. | |
void | emitCallSiteOffset (const MCSymbol *Hi, const MCSymbol *Lo, unsigned Encoding) const |
Emit reference to a call site with a specified encoding. | |
void | emitCallSiteValue (uint64_t Value, unsigned Encoding) const |
Emit an integer value corresponding to the call site encoding. | |
virtual unsigned | getISAEncoding () |
Get the value for DW_AT_APPLE_isa. Zero if no isa encoding specified. | |
virtual void | emitDebugValue (const MCExpr *Value, unsigned Size) const |
Emit the directive and value for debug thread local expression. | |
void | emitCFIInstruction (const MCCFIInstruction &Inst) const |
Emit frame instruction to describe the layout of the frame. | |
template<typename T > | |
void | emitDwarfAbbrevs (const T &Abbrevs) const |
Emit Dwarf abbreviation table. | |
void | emitDwarfAbbrev (const DIEAbbrev &Abbrev) const |
void | emitDwarfDIE (const DIE &Die) const |
Recursively emit Dwarf DIE tree. | |
virtual std::tuple< const MCSymbol *, uint64_t, const MCSymbol *, codeview::JumpTableEntrySize > | getCodeViewJumpTableInfo (int JTI, const MachineInstr *BranchInstr, const MCSymbol *BranchLabel) const |
Gets information required to create a CodeView debug symbol for a jump table. | |
virtual void | PrintSpecial (const MachineInstr *MI, raw_ostream &OS, StringRef Code) const |
Print information related to the specified machine instr that is independent of the operand, and may be independent of the instr itself. | |
virtual void | PrintSymbolOperand (const MachineOperand &MO, raw_ostream &OS) |
Print the MachineOperand as a symbol. | |
virtual bool | PrintAsmOperand (const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS) |
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant. | |
virtual bool | PrintAsmMemoryOperand (const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &OS) |
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant as an address. | |
virtual void | emitInlineAsmStart () const |
Let the target do anything it needs to do before emitting inlineasm. | |
virtual void | emitInlineAsmEnd (const MCSubtargetInfo &StartInfo, const MCSubtargetInfo *EndInfo) const |
Let the target do anything it needs to do after emitting inlineasm. | |
void | emitVisibility (MCSymbol *Sym, unsigned Visibility, bool IsDefinition=true) const |
This emits visibility information about symbol, if this is supported by the target. | |
virtual void | emitLinkage (const GlobalValue *GV, MCSymbol *GVSym) const |
This emits linkage information about GVSym based on GV , if this is supported by the target. | |
Public Member Functions inherited from llvm::MachineFunctionPass | |
bool | doInitialization (Module &) override |
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run. | |
Public Member Functions inherited from llvm::FunctionPass | |
FunctionPass (char &pid) | |
Pass * | createPrinterPass (raw_ostream &OS, const std::string &Banner) const override |
createPrinterPass - Get a function printer pass. | |
virtual bool | runOnFunction (Function &F)=0 |
runOnFunction - Virtual method overriden by subclasses to do the per-function processing of the pass. | |
void | assignPassManager (PMStack &PMS, PassManagerType T) override |
Find appropriate Function Pass Manager or Call Graph Pass Manager in the PM Stack and add self into that manager. | |
PassManagerType | getPotentialPassManagerType () const override |
Return what kind of Pass Manager can manage this pass. | |
Public Member Functions inherited from llvm::Pass | |
Pass (PassKind K, char &pid) | |
Pass (const Pass &)=delete | |
Pass & | operator= (const Pass &)=delete |
virtual | ~Pass () |
PassKind | getPassKind () const |
virtual StringRef | getPassName () const |
getPassName - Return a nice clean name for a pass. | |
AnalysisID | getPassID () const |
getPassID - Return the PassID number that corresponds to this pass. | |
virtual bool | doInitialization (Module &) |
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run. | |
virtual bool | doFinalization (Module &) |
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes have run. | |
virtual void | print (raw_ostream &OS, const Module *M) const |
print - Print out the internal state of the pass. | |
void | dump () const |
virtual Pass * | createPrinterPass (raw_ostream &OS, const std::string &Banner) const =0 |
createPrinterPass - Get a Pass appropriate to print the IR this pass operates on (Module, Function or MachineFunction). | |
virtual void | assignPassManager (PMStack &, PassManagerType) |
Each pass is responsible for assigning a pass manager to itself. | |
virtual void | preparePassManager (PMStack &) |
Check if available pass managers are suitable for this pass or not. | |
virtual PassManagerType | getPotentialPassManagerType () const |
Return what kind of Pass Manager can manage this pass. | |
void | setResolver (AnalysisResolver *AR) |
AnalysisResolver * | getResolver () const |
virtual void | getAnalysisUsage (AnalysisUsage &) const |
getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. | |
virtual void | releaseMemory () |
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. | |
virtual void * | getAdjustedAnalysisPointer (AnalysisID ID) |
getAdjustedAnalysisPointer - This method is used when a pass implements an analysis interface through multiple inheritance. | |
virtual ImmutablePass * | getAsImmutablePass () |
virtual PMDataManager * | getAsPMDataManager () |
virtual void | verifyAnalysis () const |
verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis information. | |
virtual void | dumpPassStructure (unsigned Offset=0) |
template<typename AnalysisType > | |
AnalysisType * | getAnalysisIfAvailable () const |
getAnalysisIfAvailable<AnalysisType>() - Subclasses use this function to get analysis information that might be around, for example to update it. | |
bool | mustPreserveAnalysisID (char &AID) const |
mustPreserveAnalysisID - This method serves the same function as getAnalysisIfAvailable, but works if you just have an AnalysisID. | |
template<typename AnalysisType > | |
AnalysisType & | getAnalysis () const |
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function. | |
template<typename AnalysisType > | |
AnalysisType & | getAnalysis (Function &F, bool *Changed=nullptr) |
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function. | |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI) const |
template<typename AnalysisType > | |
AnalysisType & | getAnalysisID (AnalysisID PI, Function &F, bool *Changed=nullptr) |
Static Public Member Functions | |
static Align | getGVAlignment (const GlobalObject *GV, const DataLayout &DL, Align InAlign=Align(1)) |
Return the alignment for the specified GV . | |
Static Public Member Functions inherited from llvm::Pass | |
static const PassInfo * | lookupPassInfo (const void *TI) |
static const PassInfo * | lookupPassInfo (StringRef Arg) |
static Pass * | createPass (AnalysisID ID) |
Public Attributes | |
TargetMachine & | TM |
Target machine description. | |
const MCAsmInfo * | MAI = nullptr |
Target Asm Printer information. | |
MCContext & | OutContext |
This is the context for the output file that we are streaming. | |
std::unique_ptr< MCStreamer > | OutStreamer |
This is the MCStreamer object for the file we are generating. | |
MachineFunction * | MF = nullptr |
The current machine function. | |
MachineModuleInfo * | MMI = nullptr |
This is a pointer to the current MachineModuleInfo. | |
MachineDominatorTree * | MDT = nullptr |
This is a pointer to the current MachineDominatorTree. | |
MachineLoopInfo * | MLI = nullptr |
This is a pointer to the current MachineLoopInfo. | |
MachineOptimizationRemarkEmitter * | ORE = nullptr |
Optimization remark emitter. | |
MCSymbol * | CurrentPatchableFunctionEntrySym = nullptr |
The symbol for the entry in __patchable_function_entires. | |
MCSymbol * | CurrentFnSym = nullptr |
The symbol for the current function. | |
MCSymbol * | CurrentFnDescSym = nullptr |
The symbol for the current function descriptor on AIX. | |
MCSymbol * | CurrentFnSymForSize = nullptr |
The symbol used to represent the start of the current function for the purpose of calculating its size (e.g. | |
MapVector< MBBSectionID, MBBSectionRange > | MBBSectionRanges |
MapVector< const MCSymbol *, GOTEquivUsePair > | GlobalGOTEquivs |
SmallVector< XRayFunctionEntry, 4 > | Sleds |
Protected Member Functions | |
AsmPrinter (TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer) | |
virtual void | emitGlobalAlias (const Module &M, const GlobalAlias &GA) |
virtual bool | shouldEmitWeakSwiftAsyncExtendedFramePointerFlags () const |
Protected Member Functions inherited from llvm::MachineFunctionPass | |
MachineFunctionPass (char &ID) | |
virtual bool | runOnMachineFunction (MachineFunction &MF)=0 |
runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis. | |
void | getAnalysisUsage (AnalysisUsage &AU) const override |
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this. | |
virtual MachineFunctionProperties | getRequiredProperties () const |
virtual MachineFunctionProperties | getSetProperties () const |
virtual MachineFunctionProperties | getClearedProperties () const |
Protected Member Functions inherited from llvm::FunctionPass | |
bool | skipFunction (const Function &F) const |
Optional passes call this function to check whether the pass should be skipped. | |
Protected Attributes | |
MCSymbol * | CurrentFnBegin = nullptr |
MCSymbol * | CurrentFnBeginLocal = nullptr |
For dso_local functions, the current $local alias for the function. | |
SmallVector< std::unique_ptr< AsmPrinterHandler >, 2 > | Handlers |
A vector of all debug/EH info emitters we should use. | |
size_t | NumUserHandlers = 0 |
SmallVector< std::unique_ptr< DebugHandlerBase >, 1 > | DebugHandlers |
Debuginfo handler. Protected so that targets can add their own. | |
size_t | NumUserDebugHandlers = 0 |
StackMaps | SM |
This class is intended to be used as a driving class for all asm writers.
Definition at line 86 of file AsmPrinter.h.
using llvm::AsmPrinter::AliasMapTy = DenseMap<uint64_t, SmallVector<const GlobalAlias *, 1> > |
Print a general LLVM constant to the .s file.
On AIX, when an alias refers to a sub-element of a global variable, the label of that alias needs to be emitted before the corresponding element.
Definition at line 502 of file AsmPrinter.h.
using llvm::AsmPrinter::GOTEquivUsePair = std::pair<const GlobalVariable *, unsigned> |
Map global GOT equivalent MCSymbols to GlobalVariables and keep track of its number of uses by other globals.
Definition at line 144 of file AsmPrinter.h.
|
strong |
Enumerator | |
---|---|
None | Do not emit either .eh_frame or .debug_frame. |
EH | Emit .eh_frame. |
Debug | Emit .debug_frame. |
Definition at line 148 of file AsmPrinter.h.
|
strong |
Enumerator | |
---|---|
FUNCTION_ENTER | |
FUNCTION_EXIT | |
TAIL_CALL | |
LOG_ARGS_ENTER | |
CUSTOM_EVENT | |
TYPED_EVENT |
Definition at line 335 of file AsmPrinter.h.
|
explicitprotected |
Definition at line 385 of file AsmPrinter.cpp.
References llvm::MCAsmInfo::doesDwarfUseRelocationsAcrossSections(), MAI, and OutStreamer.
|
override |
Definition at line 394 of file AsmPrinter.cpp.
References assert(), Handlers, and NumUserHandlers.
void AsmPrinter::addAsmPrinterHandler | ( | std::unique_ptr< AsmPrinterHandler > | Handler | ) |
Definition at line 4419 of file AsmPrinter.cpp.
References Handlers, and NumUserHandlers.
void AsmPrinter::addDebugHandler | ( | std::unique_ptr< DebugHandlerBase > | Handler | ) |
Definition at line 4425 of file AsmPrinter.cpp.
References DebugHandlers, and NumUserDebugHandlers.
void AsmPrinter::computeGlobalGOTEquivs | ( | Module & | M | ) |
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.
Unnamed constant global variables solely contaning a pointer to another globals variable is equivalent to a GOT table entry; it contains the the address of another symbol.
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.
Optimize it and replace accesses to these "GOT equivalents" by using the GOT entry for the final global instead. Compute GOT equivalent candidates among all global variables to avoid emitting them if possible later on, after it use is replaced by a GOT entry access.
Definition at line 2189 of file AsmPrinter.cpp.
References G, getObjFileLowering(), getSymbol(), GlobalGOTEquivs, and isGOTEquivalentCandidate().
Referenced by doFinalization().
Definition at line 4062 of file AsmPrinter.cpp.
References llvm::MCContext::createTempSymbol(), Name, and OutContext.
Referenced by llvm::DwarfFile::addRange(), llvm::DwarfDebug::beginModule(), llvm::DwarfCompileUnit::DwarfCompileUnit(), llvm::EHStreamer::emitExceptionTable(), emitFunctionBody(), llvm::SystemZAsmPrinter::emitFunctionBodyEnd(), llvm::DwarfCompileUnit::emitHeader(), llvm::DwarfTypeUnit::emitHeader(), llvm::X86AsmPrinter::emitInstruction(), llvm::WasmException::endFunction(), getMBBExceptionSym(), and SetupMachineFunction().
|
inline |
Definition at line 322 of file AsmPrinter.h.
Referenced by llvm::DwarfUnit::addSectionLabel(), emitDwarfStringOffset(), emitDwarfSymbolReference(), llvm::DIEString::emitValue(), and getDwarfFormParams().
Shut down the asmprinter.
If you override this in your pass, you must make sure to call it explicitly.
Reimplemented from llvm::Pass.
Reimplemented in llvm::AMDGPUAsmPrinter, llvm::AVRAsmPrinter, and llvm::NVPTXAsmPrinter.
Definition at line 2441 of file AsmPrinter.cpp.
References assert(), llvm::SmallVectorImpl< T >::clear(), computeGlobalGOTEquivs(), llvm::MCSymbolRefExpr::create(), DebugHandlers, llvm::GlobalValue::DefaultVisibility, DL, llvm::TargetOptions::EmitAddrsig, emitAlignment(), emitEndOfAsmFile(), emitGlobalAlias(), emitGlobalGOTEquivs(), emitGlobalVariable(), emitLinkage(), llvm::TargetLoweringObjectFile::emitModuleMetadata(), emitRemarksSection(), emitStackMaps(), emitVisibility(), llvm::GlobalValue::ExternalWeakLinkage, F, G, llvm::MCAsmInfo::getCodePointerSize(), llvm::MCContext::getCOFFSection(), llvm::MCObjectFileInfo::getDataSection(), llvm::MCContext::getELFSection(), llvm::TargetLoweringObjectFile::getFunctionEntryPointSymbol(), llvm::MachineModuleInfoELF::GetGVStubList(), llvm::MachineModuleInfoCOFF::GetGVStubList(), llvm::MCSymbol::getName(), llvm::MCAsmInfo::getNonexecutableStackSection(), llvm::MachineModuleInfo::getObjFileInfo(), getObjFileLowering(), getSymbol(), llvm::TargetMachine::getTargetTriple(), llvm::PointerType::getUnqual(), llvm::MCAsmInfo::getWeakRefDirective(), llvm::Global, Handlers, I, llvm::COFF::IMAGE_COMDAT_SELECT_ANY, llvm::COFF::IMAGE_SCN_CNT_INITIALIZED_DATA, llvm::COFF::IMAGE_SCN_LNK_COMDAT, llvm::COFF::IMAGE_SCN_MEM_READ, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::Triple::isOSBinFormatCOFF(), llvm::Triple::isOSBinFormatELF(), llvm::Triple::isOSBinFormatXCOFF(), MAI, llvm::MCSA_Global, llvm::MCSA_WeakReference, MF, MI, MMI, Name, NumUserDebugHandlers, NumUserHandlers, llvm::TargetMachine::Options, OutContext, OutStreamer, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::MachineFunction::push_back(), llvm::reverse(), shouldEmitWeakSwiftAsyncExtendedFramePointerFlags(), llvm::ELF::SHT_LLVM_SYMPART, llvm::ELF::SHT_PROGBITS, tagGlobalDefinition(), TM, and llvm::Value::use_empty().
Referenced by llvm::AMDGPUAsmPrinter::doFinalization(), llvm::AVRAsmPrinter::doFinalization(), and llvm::NVPTXAsmPrinter::doFinalization().
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.
Reimplemented from llvm::Pass.
Reimplemented in llvm::AMDGPUAsmPrinter, llvm::NVPTXAsmPrinter, llvm::SystemZAsmPrinter, and llvm::X86AsmPrinter.
Definition at line 459 of file AsmPrinter.cpp.
References llvm::AIX, llvm::ARM, assert(), DebugHandlers, llvm::MCAsmInfo::doesSupportDebugInformation(), llvm::DwarfCFI, EH, emitStartOfAsmFile(), F, llvm::sys::path::filename(), llvm::MCAsmInfo::getAssemblerDialect(), llvm::MCAsmInfo::getExceptionHandlingType(), getFunctionCFISectionType(), llvm::TargetMachine::getMCAsmInfo(), llvm::TargetMachine::getMCSubtargetInfo(), getObjFileLowering(), llvm::MCSymbolXCOFF::getSymbolTableName(), llvm::TargetMachine::getTargetTriple(), llvm::MCAsmInfo::getWinEHEncodingType(), Handlers, llvm::MCAsmInfo::hasBasenameOnlyForFileDirective(), hasDebugInfo(), llvm::MCAsmInfo::hasFourStringsDotFile(), llvm::MCSymbolXCOFF::hasRename(), llvm::MCAsmInfo::hasSingleParameterDotFile(), I, llvm::WinEH::Invalid, llvm::Triple::isOSBinFormatXCOFF(), llvm::Triple::isOSWindows(), llvm::WinEH::Itanium, llvm_unreachable, MAI, llvm::TargetOptions::MCOptions, MI, MMI, None, llvm::None, llvm::TargetMachine::Options, OutContext, OutStreamer, llvm::PseudoProbeDescMetadataName, llvm::SjLj, TM, usesCFIWithoutEH(), llvm::Wasm, llvm::WinEH, llvm::WinEH::X86, and llvm::ZOS.
Referenced by llvm::AMDGPUAsmPrinter::doInitialization(), and llvm::NVPTXAsmPrinter::doInitialization().
void AsmPrinter::emitAlignment | ( | Align | Alignment, |
const GlobalObject * | GV = nullptr , |
||
unsigned | MaxBytesToEmit = 0 |
||
) | const |
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.
Definition at line 3326 of file AsmPrinter.cpp.
References getCurrentSection(), llvm::GlobalValue::getDataLayout(), getGVAlignment(), llvm::TargetMachine::getMCSubtargetInfo(), getSubtargetInfo(), MF, OutStreamer, and TM.
Referenced by llvm::WinException::beginFunclet(), doFinalization(), emitBasicBlockStart(), emitConstantPool(), llvm::ARMAsmPrinter::emitEndOfAsmFile(), llvm::EHStreamer::emitExceptionTable(), llvm::MipsAsmPrinter::emitFunctionEntryLabel(), emitGlobalVariable(), llvm::ARMAsmPrinter::emitJumpTableAddrs(), emitJumpTableInfo(), llvm::ARMAsmPrinter::emitJumpTableInsts(), llvm::ARMAsmPrinter::emitJumpTableTBInst(), emitPatchableFunctionEntries(), llvm::X86AsmPrinter::emitStartOfAsmFile(), emitXXStructorList(), and llvm::ARMAsmPrinter::runOnMachineFunction().
|
virtual |
Targets can override this to emit stuff at the end of a basic block.
Reimplemented in llvm::MipsAsmPrinter, and llvm::X86AsmPrinter.
Definition at line 4285 of file AsmPrinter.cpp.
References DebugHandlers, Handlers, llvm::MachineBasicBlock::isEndSection(), and MBB.
Referenced by llvm::MipsAsmPrinter::emitBasicBlockEnd(), llvm::X86AsmPrinter::emitBasicBlockEnd(), and emitFunctionBody().
|
virtual |
Targets can override this to emit stuff at the start of a basic block.
emitBasicBlockStart - This method prints the label for the specified MachineBasicBlock, an alignment (if present) and a comment describing it if appropriate.
By default, this method prints the label for the specified MachineBasicBlock, an alignment (if present) and a comment describing it if appropriate.
Reimplemented in llvm::AMDGPUAsmPrinter.
Definition at line 4199 of file AsmPrinter.cpp.
References assert(), DebugHandlers, emitAlignment(), emitBasicBlockLoopComments(), llvm::MachineBasicBlock::getAddressTakenIRBlock(), getAddrLabelSymbolToEmit(), llvm::MachineBasicBlock::getAlignment(), llvm::MachineBasicBlock::getBasicBlock(), llvm::MachineBasicBlock::getEHCatchretSymbol(), llvm::MCAsmInfo::getExceptionHandlingType(), llvm::MachineFunction::getFunction(), llvm::MachineBasicBlock::getMaxBytesForAlignment(), llvm::MachineBasicBlock::getNumber(), getObjFileLowering(), llvm::MachineBasicBlock::getSymbol(), Handlers, llvm::BasicBlock::hasAddressTaken(), llvm::MachineBasicBlock::hasLabelMustBeEmitted(), llvm::MachineBasicBlock::isBeginSection(), llvm::MachineBasicBlock::isEHCatchretTarget(), llvm::MachineBasicBlock::isEHFuncletEntry(), llvm::MachineBasicBlock::isEntryBlock(), llvm::MachineBasicBlock::isIRBlockAddressTaken(), llvm::MachineBasicBlock::isMachineBlockAddressTaken(), isVerbose(), MAI, MBB, MF, MLI, OutStreamer, Sym, TM, and llvm::WinEH.
Referenced by llvm::AMDGPUAsmPrinter::emitBasicBlockStart(), and emitFunctionBody().
void AsmPrinter::emitBBAddrMapSection | ( | const MachineFunction & | MF | ) |
Definition at line 1432 of file AsmPrinter.cpp.
References assert(), emitLabelDifferenceAsULEB128(), getBBAddrMapFeature(), getBBAddrMapMetadata(), llvm::MCObjectFileInfo::getBBAddrMapSection(), llvm::MachineBasicBlock::getBBID(), llvm::MachineBlockFrequencyInfo::getBlockFreq(), llvm::MachineBranchProbabilityInfo::getEdgeProbability(), llvm::MachineBasicBlock::getEndSymbol(), llvm::Function::getEntryCount(), llvm::BlockFrequency::getFrequency(), llvm::MachineFunction::getFunction(), getFunctionBegin(), llvm::BranchProbability::getNumerator(), getObjFileLowering(), getPointerSize(), llvm::MachineFunction::getSection(), llvm::MachineBasicBlock::getSectionID(), llvm::MachineBasicBlock::getSymbol(), llvm::MachineBasicBlock::isBeginSection(), llvm::MachineBasicBlock::isEndSection(), llvm::MachineBasicBlock::isEntryBlock(), MBB, MBBSectionRanges, MF, OutStreamer, llvm::MachineFunction::size(), llvm::MachineBasicBlock::succ_size(), and llvm::MachineBasicBlock::successors().
Referenced by emitFunctionBody().
void AsmPrinter::emitCallSiteOffset | ( | const MCSymbol * | Hi, |
const MCSymbol * | Lo, | ||
unsigned | Encoding | ||
) | const |
Emit reference to a call site with a specified encoding.
Definition at line 184 of file AsmPrinterDwarf.cpp.
References llvm::dwarf::DW_EH_PE_uleb128, emitLabelDifference(), emitLabelDifferenceAsULEB128(), GetSizeOfEncodedValue(), llvm::Hi, and llvm::Lo.
Referenced by llvm::EHStreamer::emitExceptionTable().
Emit an integer value corresponding to the call site encoding.
Definition at line 193 of file AsmPrinterDwarf.cpp.
References llvm::dwarf::DW_EH_PE_uleb128, emitULEB128(), GetSizeOfEncodedValue(), and OutStreamer.
Referenced by llvm::EHStreamer::emitExceptionTable().
void AsmPrinter::emitCFIInstruction | ( | const MachineInstr & | MI | ) |
Definition at line 1350 of file AsmPrinter.cpp.
References llvm::ARM, llvm::DwarfCFI, emitCFIInstruction(), llvm::MachineBasicBlock::end(), llvm::MCAsmInfo::getExceptionHandlingType(), llvm::MachineFunction::getFrameInstructions(), getFunctionCFISectionType(), llvm::MachineBasicBlock::getParent(), llvm::ilist_node_impl< OptionsT >::getReverseIterator(), I, llvm::MachineBasicBlock::instr_end(), MAI, MBB, MF, MI, None, llvm::MachineFunction::rbegin(), and usesCFIWithoutEH().
Referenced by emitCFIInstruction(), and emitFunctionBody().
void AsmPrinter::emitCFIInstruction | ( | const MCCFIInstruction & | Inst | ) | const |
Emit frame instruction to describe the layout of the frame.
Definition at line 205 of file AsmPrinterDwarf.cpp.
References llvm::MCCFIInstruction::getAddressSpace(), llvm::MCCFIInstruction::getComment(), llvm::MCCFIInstruction::getLoc(), llvm::MCCFIInstruction::getOffset(), llvm::MCCFIInstruction::getOperation(), llvm::MCCFIInstruction::getRegister(), llvm::MCCFIInstruction::getRegister2(), llvm::MCCFIInstruction::getValues(), llvm_unreachable, llvm::MCCFIInstruction::OpAdjustCfaOffset, llvm::MCCFIInstruction::OpDefCfa, llvm::MCCFIInstruction::OpDefCfaOffset, llvm::MCCFIInstruction::OpDefCfaRegister, llvm::MCCFIInstruction::OpEscape, llvm::MCCFIInstruction::OpGnuArgsSize, llvm::MCCFIInstruction::OpLLVMDefAspaceCfa, llvm::MCCFIInstruction::OpNegateRAState, llvm::MCCFIInstruction::OpNegateRAStateWithPC, llvm::MCCFIInstruction::OpOffset, llvm::MCCFIInstruction::OpRegister, llvm::MCCFIInstruction::OpRememberState, llvm::MCCFIInstruction::OpRestore, llvm::MCCFIInstruction::OpRestoreState, llvm::MCCFIInstruction::OpSameValue, llvm::MCCFIInstruction::OpUndefined, llvm::MCCFIInstruction::OpValOffset, llvm::MCCFIInstruction::OpWindowSave, and OutStreamer.
|
virtual |
Print to the current output stream assembly representations of the constants in the constant pool MCP.
EmitConstantPool - 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.
Reimplemented in llvm::ARMAsmPrinter, llvm::CSKYAsmPrinter, llvm::MipsAsmPrinter, llvm::WebAssemblyAsmPrinter, and llvm::XtensaAsmPrinter.
Definition at line 2785 of file AsmPrinter.cpp.
References llvm::alignTo(), llvm::CallingConv::C, llvm::MachineConstantPoolEntry::ConstVal, emitAlignment(), emitGlobalConstant(), emitMachineConstantPoolValue(), llvm::MachineConstantPoolEntry::getAlign(), llvm::MachineFunction::getConstantPool(), llvm::MachineConstantPool::getConstants(), GetCPISymbol(), getDataLayout(), getObjFileLowering(), llvm::TargetLoweringObjectFile::getSectionForConstant(), llvm::MachineConstantPoolEntry::getSectionKind(), llvm::MachineConstantPoolEntry::getSizeInBytes(), llvm::MachineConstantPoolEntry::isMachineConstantPoolEntry(), llvm::MachineConstantPoolEntry::MachineCPVal, MF, llvm::Offset, OutStreamer, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorBase< Size_T >::size(), Sym, and llvm::MachineConstantPoolEntry::Val.
Emit the directive and value for debug thread local expression.
Value
- The value to emit. Size
- The size of the integer (in bytes) to emit.
Value
- The value to emit. Size
- The size of the integer (in bytes) to emit.
Reimplemented in llvm::MipsAsmPrinter.
Definition at line 920 of file AsmPrinter.cpp.
References OutStreamer, and Size.
Referenced by llvm::MipsAsmPrinter::emitDebugValue(), and llvm::DIEExpr::emitValue().
Definition at line 304 of file AsmPrinterDwarf.cpp.
References llvm::DIEAbbrev::Emit(), emitULEB128(), and llvm::DIEAbbrev::getNumber().
Referenced by emitDwarfAbbrevs().
Emit Dwarf abbreviation table.
Definition at line 772 of file AsmPrinter.h.
References emitDwarfAbbrev(), and emitULEB128().
Referenced by llvm::DIEAbbrevSet::Emit().
Recursively emit Dwarf DIE tree.
Definition at line 269 of file AsmPrinterDwarf.cpp.
References llvm::dwarf::AccessibilityString(), assert(), llvm::dwarf::AttributeString(), llvm::DIE::children(), emitDwarfDIE(), emitInt8(), emitULEB128(), llvm::DIE::getAbbrevNumber(), llvm::DIE::getOffset(), llvm::DIE::getSize(), llvm::DIE::getTag(), llvm::DIE::hasChildren(), isVerbose(), OutStreamer, llvm::dwarf::TagString(), llvm::Twine::utohexstr(), and llvm::DIEValueList::values().
Referenced by emitDwarfDIE(), and llvm::DwarfFile::emitUnit().
void AsmPrinter::emitDwarfLengthOrOffset | ( | uint64_t | Value | ) | const |
Emit 32- or 64-bit value depending on the DWARF format.
Definition at line 169 of file AsmPrinterDwarf.cpp.
References assert(), getDwarfOffsetByteSize(), isDwarf64(), and OutStreamer.
Referenced by llvm::DwarfUnit::emitCommonHeader(), and llvm::DwarfTypeUnit::emitHeader().
Emit something like ".long Label + Offset" or ".quad Label + Offset" depending on the DWARF format.
Definition at line 165 of file AsmPrinterDwarf.cpp.
References emitLabelPlusOffset(), getDwarfOffsetByteSize(), and llvm::Offset.
void AsmPrinter::emitDwarfStringOffset | ( | DwarfStringPoolEntry | S | ) | const |
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 emitDwarfSymbolReference().
The length of the emitted value depends on the DWARF format.
Definition at line 154 of file AsmPrinterDwarf.cpp.
References assert(), doesDwarfUseRelocationsAcrossSections(), emitDwarfSymbolReference(), getDwarfOffsetByteSize(), llvm::DwarfStringPoolEntry::Offset, OutStreamer, and llvm::DwarfStringPoolEntry::Symbol.
Referenced by emitDwarfStringOffset().
|
inline |
Emit the 4-or 8-byte offset of a string from the start of its section.
Definition at line 728 of file AsmPrinter.h.
References emitDwarfStringOffset(), and llvm::DwarfStringPoolEntryRef::getEntry().
void AsmPrinter::emitDwarfSymbolReference | ( | const MCSymbol * | Label, |
bool | ForceOffset = false |
||
) | const |
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.
Definition at line 131 of file AsmPrinterDwarf.cpp.
References assert(), doesDwarfUseRelocationsAcrossSections(), emitLabelDifference(), getDwarfOffsetByteSize(), isDwarf64(), MAI, llvm::MCAsmInfo::needsDwarfSectionOffsetDirective(), and OutStreamer.
Referenced by llvm::DwarfUnit::emitCommonHeader(), emitDwarfStringOffset(), and llvm::DIELocList::emitValue().
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.
Definition at line 179 of file AsmPrinterDwarf.cpp.
References OutStreamer.
Emit a unit length field.
The actual format, DWARF32 or DWARF64, is chosen according to the settings.
Definition at line 174 of file AsmPrinterDwarf.cpp.
References llvm::Length, and OutStreamer.
Referenced by llvm::DwarfUnit::emitCommonHeader().
Emit a .byte 42 directive that corresponds to an encoding.
EmitEncodingByte - 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").
If verbose assembly output is enabled, we output comments describing the encoding. Desc is an optional string saying what the encoding is specifying (e.g. "LSDA").
Definition at line 89 of file AsmPrinterDwarf.cpp.
References DecodeDWARFEncoding(), isVerbose(), and OutStreamer.
Referenced by llvm::EHStreamer::emitExceptionTable().
|
inlinevirtual |
This virtual method can be overridden by targets that want to emit something at the end of their file.
Reimplemented in llvm::AMDGPUAsmPrinter, llvm::ARMAsmPrinter, llvm::CSKYAsmPrinter, llvm::HexagonAsmPrinter, llvm::M68kAsmPrinter, llvm::MipsAsmPrinter, llvm::SystemZAsmPrinter, llvm::WebAssemblyAsmPrinter, and llvm::X86AsmPrinter.
Definition at line 541 of file AsmPrinter.h.
Referenced by doFinalization().
void AsmPrinter::emitFrameAlloc | ( | const MachineInstr & | MI | ) |
Definition at line 1376 of file AsmPrinter.cpp.
References llvm::MCConstantExpr::create(), MI, OutContext, and OutStreamer.
Referenced by emitFunctionBody().
void AsmPrinter::emitFunctionBody | ( | ) |
This method emits the body and trailer for a function.
EmitFunctionBody - This method emits the body and trailer for a function.
Definition at line 1782 of file AsmPrinter.cpp.
References A, llvm::MachineOptimizationRemarkEmitter::allowExtraAnalysis(), assert(), B, llvm::MachineFunction::back(), llvm::TargetOptions::BBAddrMap, llvm::MachineBasicBlock::begin(), llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createSub(), createTempSymbol(), CurrentFnBegin, CurrentFnBeginLocal, CurrentFnSym, CurrentFnSymForSize, DEBUG_TYPE, DebugHandlers, llvm::MachineOptimizationRemarkEmitter::emit(), emitBasicBlockEnd(), emitBasicBlockStart(), emitBBAddrMapSection(), emitCFIInstruction(), emitComments(), emitDebugLabelComment(), emitDebugValueComment(), emitFakeUse(), emitFrameAlloc(), emitFunctionBodyEnd(), emitFunctionBodyStart(), emitImplicitDef(), emitInstruction(), emitJumpTableInfo(), emitKill(), emitNops(), emitPatchableFunctionEntries(), emitPCSections(), emitPCSectionsLabel(), emitPseudoProbe(), emitStackSizeSection(), emitStackUsage(), llvm::SmallVectorImpl< T >::emplace_back(), llvm::MachineBasicBlock::empty(), llvm::MachineFunction::empty(), llvm::MachineBasicBlock::end(), F, llvm::MachineFunction::front(), GetBlockAddressSymbol(), llvm::MachineFunction::getContext(), llvm::MachineBasicBlock::getEndSymbol(), llvm::MachineFunction::getFunction(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::TargetMachine::getMCSubtargetInfo(), getMIMnemonic(), llvm::MachineModuleInfo::getModule(), llvm::Module::getModuleFlag(), llvm::MachineBasicBlock::getName(), llvm::MachineFunction::getName(), llvm::TargetInstrInfo::getNop(), llvm::MCInst::getOpcode(), llvm::MachineFunction::getSection(), llvm::MachineBasicBlock::getSectionID(), llvm::Function::getSubprogram(), llvm::MachineFunction::getSubtarget(), getSubtargetInfo(), llvm::MachineFunction::getTarget(), llvm::TargetMachine::getTargetTriple(), Handlers, llvm::MCAsmInfo::hasDotTypeDotSizeDirective(), llvm::MCAsmInfo::hasSubsectionsViaSymbols(), if(), llvm::MachineBasicBlock::isEndSection(), isVerbose(), MAI, MBB, MBBSectionRanges, MDT, MF, MI, MLI, MMI, Name, needFuncLabels(), llvm::TargetMachine::Options, ORE, OutContext, OutStreamer, PgoAnalysisMapFeatures, llvm::MCContext::reportWarning(), llvm::MachineBasicBlock::sameSection(), llvm::sort(), llvm::Triple::SPIRV, Sym, and TM.
Referenced by llvm::ARMAsmPrinter::runOnMachineFunction(), runOnMachineFunction(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), llvm::R600AsmPrinter::runOnMachineFunction(), and llvm::X86AsmPrinter::runOnMachineFunction().
|
inlinevirtual |
Targets can override this to emit stuff after the last basic block in the function.
Reimplemented in llvm::AMDGPUAsmPrinter, llvm::ARMAsmPrinter, llvm::CSKYAsmPrinter, llvm::M68kAsmPrinter, llvm::MipsAsmPrinter, llvm::SystemZAsmPrinter, and llvm::X86AsmPrinter.
Definition at line 549 of file AsmPrinter.h.
Referenced by emitFunctionBody().
|
inlinevirtual |
Targets can override this to emit stuff before the first basic block in the function.
Reimplemented in llvm::AMDGPUAsmPrinter, llvm::M68kAsmPrinter, llvm::MipsAsmPrinter, llvm::WebAssemblyAsmPrinter, and llvm::X86AsmPrinter.
Definition at line 545 of file AsmPrinter.h.
Referenced by emitFunctionBody(), and llvm::WebAssemblyAsmPrinter::emitFunctionBodyStart().
|
inlinevirtual |
Definition at line 570 of file AsmPrinter.h.
References llvm_unreachable.
|
virtual |
EmitFunctionEntryLabel - Emit the label that is the entrypoint for the function.
This can be overridden by targets as required to do custom stuff.
Reimplemented in llvm::AMDGPUAsmPrinter, llvm::ARMAsmPrinter, llvm::MipsAsmPrinter, and llvm::SystemZAsmPrinter.
Definition at line 1078 of file AsmPrinter.cpp.
References CurrentFnBeginLocal, CurrentFnSym, llvm::MachineFunction::getFunction(), llvm::MCSymbol::getName(), getSymbolPreferLocal(), llvm::TargetMachine::getTargetTriple(), llvm::MCAsmInfo::hasDotTypeDotSizeDirective(), llvm::Triple::isOSBinFormatELF(), llvm::MCSymbol::isVariable(), MAI, llvm::MCSA_ELF_TypeFunction, MF, OutStreamer, llvm::MCSymbol::redefineIfPossible(), llvm::report_fatal_error(), llvm::ELF::STT_FUNC, Sym, and TM.
Referenced by llvm::AMDGPUAsmPrinter::emitFunctionEntryLabel(), llvm::ARMAsmPrinter::emitFunctionEntryLabel(), and llvm::SystemZAsmPrinter::emitFunctionEntryLabel().
|
protectedvirtual |
Definition at line 2223 of file AsmPrinter.cpp.
References assert(), llvm::MCConstantExpr::create(), DL, emitLinkage(), emitVisibility(), llvm::GlobalAlias::getAliasee(), llvm::GlobalAlias::getAliaseeObject(), getObjFileLowering(), getSymbol(), getSymbolPreferLocal(), llvm::TargetMachine::getTargetTriple(), llvm::GlobalValue::getValueType(), llvm::GlobalValue::getVisibility(), llvm::MCAsmInfo::getWeakRefDirective(), llvm::MCAsmInfo::hasDotTypeDotSizeDirective(), llvm::GlobalValue::hasExternalLinkage(), llvm::GlobalValue::hasLinkOnceLinkage(), llvm::GlobalValue::hasLocalLinkage(), llvm::GlobalValue::hasPrivateLinkage(), llvm::MCAsmInfo::hasVisibilityOnlyWithLinkage(), llvm::GlobalValue::hasWeakLinkage(), llvm::COFF::IMAGE_SYM_CLASS_EXTERNAL, llvm::COFF::IMAGE_SYM_CLASS_STATIC, llvm::COFF::IMAGE_SYM_DTYPE_FUNCTION, llvm::Type::isFunctionTy(), llvm::MCAsmInfo::isMachO(), llvm::Triple::isOSBinFormatCOFF(), llvm::Triple::isOSBinFormatXCOFF(), llvm::Type::isSized(), lowerConstant(), MAI, llvm::MCSA_AltEntry, llvm::MCSA_ELF_TypeFunction, llvm::MCSA_Global, llvm::MCSA_WeakReference, Name, OutContext, OutStreamer, llvm::COFF::SCT_COMPLEX_TYPE_SHIFT, Size, llvm::Constant::stripPointerCasts(), and TM.
Referenced by doFinalization().
void AsmPrinter::emitGlobalConstant | ( | const DataLayout & | DL, |
const Constant * | CV, | ||
AliasMapTy * | AliasList = nullptr |
||
) |
EmitGlobalConstant - Print a general LLVM constant to the .s file.
Definition at line 4020 of file AsmPrinter.cpp.
References DL, emitGlobalConstantImpl(), getSymbol(), llvm::Value::getType(), llvm::MCAsmInfo::hasSubsectionsViaSymbols(), MAI, OutStreamer, and Size.
Referenced by emitConstantPool(), emitGlobalVariable(), llvm::ARMAsmPrinter::emitInstruction(), llvm::MipsAsmPrinter::emitInstruction(), emitKCFITypeId(), llvm::ARMAsmPrinter::emitMachineConstantPoolValue(), emitPCSections(), and emitXXStructor().
void AsmPrinter::emitGlobalGOTEquivs | ( | ) |
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.
Constant expressions using GOT equivalent globals may not be eligible for PC relative GOT entry conversion, in such cases we need to emit such globals we previously omitted in EmitGlobalVariable.
Definition at line 2206 of file AsmPrinter.cpp.
References emitGlobalVariable(), getObjFileLowering(), GlobalGOTEquivs, I, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by doFinalization().
|
virtual |
Emit the specified global variable to the .s file.
EmitGlobalVariable - Emit the specified global variable to the .s file.
Reimplemented in llvm::AMDGPUAsmPrinter, llvm::ARMAsmPrinter, llvm::NVPTXAsmPrinter, and llvm::WebAssemblyAsmPrinter.
Definition at line 723 of file AsmPrinter.cpp.
References llvm::Triple::aarch64, assert(), llvm::MCConstantExpr::create(), DebugHandlers, DL, emitAlignment(), emitGlobalConstant(), emitLinkage(), emitSpecialLLVMGlobal(), emitVisibility(), llvm::GlobalValue::getDataLayout(), GetExternalSymbolSymbol(), getGVAlignment(), llvm::GlobalVariable::getInitializer(), llvm::TargetLoweringObjectFile::getKindForGlobal(), llvm::MCAsmInfo::getLCOMMDirectiveAlignmentType(), llvm::MCAsmInfo::getMemtagAttr(), llvm::MCSymbol::getName(), getObjFileLowering(), llvm::MCContext::getOrCreateSymbol(), llvm::GlobalValue::getParent(), getSymbol(), getSymbolPreferLocal(), llvm::TargetMachine::getTargetTriple(), llvm::MCObjectFileInfo::getTLSBSSSection(), llvm::MCObjectFileInfo::getTLSExtraDataSection(), llvm::GlobalValue::getType(), llvm::GlobalValue::getValueType(), llvm::GlobalValue::getVisibility(), GlobalGOTEquivs, llvm::GlobalValue::hasCommonLinkage(), llvm::MCAsmInfo::hasDotTypeDotSizeDirective(), llvm::GlobalVariable::hasInitializer(), llvm::SectionKind::isBSS(), llvm::SectionKind::isBSSLocal(), llvm::SectionKind::isCommon(), llvm::GlobalValue::isDeclaration(), llvm::MCSymbol::isDefined(), llvm::MCAsmInfo::isMachO(), llvm::GlobalValue::isTagged(), llvm::SectionKind::isThreadBSS(), llvm::SectionKind::isThreadData(), llvm::GlobalValue::isThreadLocal(), llvm::SectionKind::isThreadLocal(), llvm::MCSymbol::isVariable(), isVerbose(), llvm::MCSection::isVirtualSection(), MAI, llvm::MCSA_ELF_TypeObject, llvm::MCSA_Local, llvm::LCOMM::NoAlignment, OutContext, OutStreamer, llvm::Value::printAsOperand(), llvm::MCSymbol::redefineIfPossible(), llvm::MCContext::reportError(), llvm::TargetLoweringObjectFile::SectionForGlobal(), Size, TM, and llvm::TargetMachine::useEmulatedTLS().
Referenced by doFinalization(), emitGlobalGOTEquivs(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::ARMAsmPrinter::emitGlobalVariable(), and llvm::WebAssemblyAsmPrinter::emitGlobalVariable().
|
virtual |
Targets can override this to customize the output of IMPLICIT_DEF instructions in verbose mode.
emitImplicitDef - This method emits the specified machine instruction that is an implicit def.
Reimplemented in llvm::AMDGPUAsmPrinter.
Definition at line 1146 of file AsmPrinter.cpp.
References llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), MF, MI, OS, OutStreamer, and llvm::printReg().
Referenced by emitFunctionBody().
void AsmPrinter::emitInitialRawDwarfLocDirective | ( | const MachineFunction & | MF | ) |
Emits inital debug location directive.
Definition at line 432 of file AsmPrinter.cpp.
References assert(), llvm::DwarfDebug::emitInitialLocDirective(), llvm::MachineFunction::getFunction(), llvm::Function::getSubprogram(), MF, and OutStreamer.
|
virtual |
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. StartInfo
- the original subtarget info before inline asm EndInfo
- the final subtarget info after parsing the inline asm, or NULL if the value is unknown.
Reimplemented in llvm::ARMAsmPrinter.
Definition at line 513 of file AsmPrinterInlineAsm.cpp.
|
virtual |
Let the target do anything it needs to do before emitting inlineasm.
StartInfo
- the subtarget info before parsing inline asm
Definition at line 511 of file AsmPrinterInlineAsm.cpp.
|
inlinevirtual |
Targets should implement this to emit instructions.
Reimplemented in llvm::AMDGPUAsmPrinter, llvm::R600AsmPrinter, llvm::ARMAsmPrinter, llvm::AVRAsmPrinter, llvm::CSKYAsmPrinter, llvm::HexagonAsmPrinter, llvm::LoongArchAsmPrinter, llvm::M68kAsmPrinter, llvm::MipsAsmPrinter, llvm::SystemZAsmPrinter, llvm::WebAssemblyAsmPrinter, llvm::X86AsmPrinter, and llvm::XtensaAsmPrinter.
Definition at line 561 of file AsmPrinter.h.
References llvm_unreachable.
Referenced by emitFunctionBody().
void AsmPrinter::emitInt16 | ( | int | Value | ) | const |
Emit a short directive and value.
Definition at line 3258 of file AsmPrinter.cpp.
References OutStreamer.
Referenced by llvm::DwarfUnit::emitCommonHeader(), and llvm::DwarfDebug::emitDebugLocEntryLocation().
void AsmPrinter::emitInt32 | ( | int | Value | ) | const |
Emit a long directive and value.
Definition at line 3261 of file AsmPrinter.cpp.
References OutStreamer.
void AsmPrinter::emitInt64 | ( | uint64_t | Value | ) | const |
Emit a long long directive and value.
Definition at line 3280 of file AsmPrinter.cpp.
References OutStreamer.
Referenced by llvm::DwarfCompileUnit::emitHeader().
void AsmPrinter::emitInt8 | ( | int | Value | ) | const |
Emit a byte directive and value.
Definition at line 3255 of file AsmPrinter.cpp.
References OutStreamer.
Referenced by llvm::DwarfUnit::emitCommonHeader(), emitDwarfDIE(), llvm::APByteStreamer::emitInt8(), and llvm::DIEInlineString::emitValue().
|
virtual |
Print assembly representations of the jump tables used by the current function to the current output stream.
emit a .set directive for each unique entry.
Reimplemented in llvm::LoongArchAsmPrinter, and llvm::WebAssemblyAsmPrinter.
Definition at line 2862 of file AsmPrinter.cpp.
References llvm::sampleprof::Base, llvm::MCSymbolRefExpr::create(), llvm::MCBinaryExpr::createSub(), DL, llvm::MCAsmInfo::doesSetDirectiveSuppressReloc(), llvm::MachineJumpTableInfo::EK_Inline, llvm::MachineJumpTableInfo::EK_LabelDifference32, llvm::MachineJumpTableInfo::EK_LabelDifference64, emitAlignment(), EmitJumpTableSizesSection, F, llvm::MachineFunction::getDataLayout(), llvm::MachineJumpTableInfo::getEntryAlignment(), llvm::MachineJumpTableInfo::getEntryKind(), llvm::MachineFunction::getFunction(), GetJTISymbol(), GetJTSetSymbol(), llvm::MachineFunction::getJumpTableInfo(), llvm::MachineJumpTableInfo::getJumpTables(), llvm::MachineBasicBlock::getNumber(), getObjFileLowering(), llvm::TargetLowering::getPICJumpTableRelocBaseExpr(), llvm::TargetLoweringObjectFile::getSectionForJumpTable(), llvm::MachineFunction::getSubtarget(), llvm::MachineBasicBlock::getSymbol(), llvm::TargetSubtargetInfo::getTargetLowering(), llvm::SmallPtrSetImpl< PtrType >::insert(), LHS, MAI, MBB, llvm::MCDR_DataRegionEnd, llvm::MCDR_DataRegionJT32, MF, OutContext, OutStreamer, llvm::TargetLoweringObjectFile::shouldPutJumpTableInFunctionSection(), and TM.
Referenced by emitFunctionBody(), and llvm::LoongArchAsmPrinter::emitJumpTableInfo().
void AsmPrinter::emitKCFITrapEntry | ( | const MachineFunction & | MF, |
const MCSymbol * | Symbol | ||
) |
Definition at line 1556 of file AsmPrinter.cpp.
References llvm::MCContext::createLinkerPrivateTempSymbol(), llvm::MCObjectFileInfo::getKCFITrapSection(), getObjFileLowering(), llvm::MachineFunction::getSection(), MF, OutContext, and OutStreamer.
|
virtual |
Reimplemented in llvm::X86AsmPrinter.
Definition at line 1573 of file AsmPrinter.cpp.
References emitGlobalConstant(), F, llvm::MachineFunction::getFunction(), and MF.
void AsmPrinter::emitLabelDifference | ( | const MCSymbol * | Hi, |
const MCSymbol * | Lo, | ||
unsigned | Size | ||
) | const |
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.
This implicitly uses .set if it avoids relocations.
Definition at line 3287 of file AsmPrinter.cpp.
References llvm::Hi, llvm::Lo, OutStreamer, and Size.
Referenced by emitCallSiteOffset(), emitDwarfSymbolReference(), emitPCSections(), and llvm::DIEDelta::emitValue().
Emit something like ".uleb128 Hi-Lo".
Definition at line 3293 of file AsmPrinter.cpp.
References llvm::Hi, llvm::Lo, and OutStreamer.
Referenced by emitBBAddrMapSection(), emitCallSiteOffset(), llvm::EHStreamer::emitExceptionTable(), and emitPCSections().
void AsmPrinter::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 Size and Label specifies the label.
EmitLabelPlusOffset - 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.
Definition at line 3301 of file AsmPrinter.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createAdd(), MAI, llvm::MCAsmInfo::needsDwarfSectionOffsetDirective(), llvm::Offset, OutContext, OutStreamer, and Size.
Referenced by emitDwarfOffset(), emitLabelReference(), and llvm::DIEEntry::emitValue().
|
inline |
Emit something like ".long Label" where the size in bytes of the directive is specified by Size and Label specifies the label.
Definition at line 692 of file AsmPrinter.h.
References emitLabelPlusOffset(), and Size.
Referenced by llvm::BTFKindDataSec::emitType(), and llvm::DIELabel::emitValue().
|
virtual |
This emits linkage information about GVSym
based on GV
, if this is supported by the target.
Definition at line 656 of file AsmPrinter.cpp.
References llvm::GlobalValue::AppendingLinkage, llvm::GlobalValue::AvailableExternallyLinkage, llvm::MCAsmInfo::avoidWeakIfComdat(), canBeHidden(), llvm::GlobalValue::CommonLinkage, llvm::GlobalValue::ExternalLinkage, llvm::GlobalValue::ExternalWeakLinkage, llvm::GlobalValue::getLinkage(), llvm::GlobalValue::hasComdat(), llvm::GlobalValue::InternalLinkage, llvm::MCAsmInfo::isMachO(), llvm::GlobalValue::LinkOnceAnyLinkage, llvm::GlobalValue::LinkOnceODRLinkage, llvm_unreachable, MAI, llvm::MCSA_Global, llvm::MCSA_Weak, llvm::MCSA_WeakDefAutoPrivate, llvm::MCSA_WeakDefinition, OutStreamer, llvm::GlobalValue::PrivateLinkage, llvm::GlobalValue::WeakAnyLinkage, and llvm::GlobalValue::WeakODRLinkage.
Referenced by doFinalization(), llvm::ARMAsmPrinter::emitFunctionEntryLabel(), emitGlobalAlias(), emitGlobalVariable(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::WebAssemblyAsmPrinter::emitGlobalVariable(), and llvm::X86AsmPrinter::emitKCFITypeId().
|
virtual |
Reimplemented in llvm::ARMAsmPrinter, llvm::CSKYAsmPrinter, llvm::SystemZAsmPrinter, and llvm::XtensaAsmPrinter.
Definition at line 4040 of file AsmPrinter.cpp.
References llvm_unreachable.
Referenced by emitConstantPool(), and llvm::MipsAsmPrinter::emitInstruction().
|
inlinevirtual |
Definition at line 607 of file AsmPrinter.h.
References llvm_unreachable.
|
inlinevirtual |
Definition at line 613 of file AsmPrinter.h.
References llvm_unreachable.
void AsmPrinter::emitNops | ( | unsigned | N | ) |
Emit N NOP instructions.
Definition at line 4052 of file AsmPrinter.cpp.
References EmitToStreamer(), llvm::TargetSubtargetInfo::getInstrInfo(), llvm::TargetInstrInfo::getNop(), llvm::MachineFunction::getSubtarget(), MF, N, and OutStreamer.
Referenced by emitFunctionBody(), llvm::HexagonAsmPrinter::EmitSled(), llvm::LoongArchAsmPrinter::emitSled(), llvm::LoongArchAsmPrinter::LowerPATCHABLE_FUNCTION_ENTER(), and llvm::LoongArchAsmPrinter::LowerSTATEPOINT().
void AsmPrinter::emitPatchableFunctionEntries | ( | ) |
Definition at line 4554 of file AsmPrinter.cpp.
References llvm::MCAsmInfo::binutilsIsAtLeast(), CurrentFnSym, CurrentPatchableFunctionEntrySym, emitAlignment(), F, llvm::MCContext::getELFSection(), llvm::MachineFunction::getFunction(), getPointerSize(), llvm::TargetMachine::getTargetTriple(), llvm::Triple::isOSBinFormatELF(), MAI, MF, llvm::MCSection::NonUniqueID, OutContext, OutStreamer, llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_GROUP, llvm::ELF::SHF_LINK_ORDER, llvm::ELF::SHF_WRITE, llvm::ELF::SHT_PROGBITS, TM, and llvm::MCAsmInfo::useIntegratedAssembler().
Referenced by emitFunctionBody().
void AsmPrinter::emitPCSections | ( | const MachineFunction & | MF | ) |
Emits the PC sections collected from instructions.
Definition at line 1657 of file AsmPrinter.cpp.
References assert(), llvm::sampleprof::Base, llvm::CallingConv::C, llvm::StringRef::contains(), llvm::MCContext::createTempSymbol(), DL, emitGlobalConstant(), emitLabelDifference(), emitLabelDifferenceAsULEB128(), emitULEB128(), F, llvm::StringRef::find(), llvm::TargetMachine::getCodeModel(), llvm::MachineFunction::getContext(), llvm::MachineFunction::getFunction(), getFunctionBegin(), getFunctionEnd(), getObjFileLowering(), llvm::MDNode::getOperand(), llvm::MCObjectFileInfo::getPCSection(), getPointerSize(), llvm::MachineFunction::getSection(), llvm::MachineFunction::getTarget(), llvm::CodeModel::Large, llvm::CodeModel::Medium, MF, llvm::MDNode::operands(), OutStreamer, Size, llvm::StringRef::substr(), and Sym.
Referenced by emitFunctionBody().
void AsmPrinter::emitPCSectionsLabel | ( | const MachineFunction & | MF, |
const MDNode & | MD | ||
) |
Emits a label as reference for PC sections.
Definition at line 1650 of file AsmPrinter.cpp.
References llvm::MCContext::createTempSymbol(), llvm::MachineFunction::getContext(), MF, and OutStreamer.
Referenced by emitFunctionBody().
void AsmPrinter::emitPseudoProbe | ( | const MachineInstr & | MI | ) |
void AsmPrinter::emitRemarksSection | ( | remarks::RemarkStreamer & | RS | ) |
Definition at line 2381 of file AsmPrinter.cpp.
References assert(), llvm::remarks::RemarkStreamer::getFilename(), llvm::MCContext::getObjectFileInfo(), llvm::MCObjectFileInfo::getRemarksSection(), llvm::remarks::RemarkStreamer::getSerializer(), llvm::sys::fs::make_absolute(), llvm::remarks::RemarkSerializer::metaSerializer(), llvm::remarks::RemarkStreamer::needsSection(), OS, OutContext, and OutStreamer.
Referenced by doFinalization().
Emit the specified signed leb128 value.
EmitSLEB128 - emit the specified signed leb128 value.
Definition at line 3264 of file AsmPrinter.cpp.
References isVerbose(), and OutStreamer.
Referenced by llvm::DIEAbbrev::Emit(), llvm::EHStreamer::emitExceptionTable(), and llvm::APByteStreamer::emitSLEB128().
bool AsmPrinter::emitSpecialLLVMGlobal | ( | const GlobalVariable * | GV | ) |
Check to see if the specified global is a special global used by LLVM.
EmitSpecialLLVMGlobal - 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.
Definition at line 3060 of file AsmPrinter.cpp.
References assert(), llvm::CallingConv::C, emitXXStructorList(), llvm::MCContext::getCOFFSection(), llvm::GlobalValue::getDataLayout(), llvm::GlobalVariable::getInitializer(), llvm::Value::getName(), llvm::MCContext::getOrCreateSymbol(), llvm::GlobalObject::getSection(), getSymbol(), llvm::GlobalValue::hasAppendingLinkage(), llvm::GlobalValue::hasAvailableExternallyLinkage(), llvm::GlobalVariable::hasInitializer(), llvm::MCAsmInfo::hasNoDeadStrip(), llvm::COFF::IMAGE_SCN_LNK_INFO, MAI, OutContext, OutStreamer, and llvm::report_fatal_error().
Referenced by emitGlobalVariable().
void AsmPrinter::emitStackMaps | ( | ) |
Emit the stack maps.
Definition at line 4398 of file AsmPrinter.cpp.
References assert(), I, MI, llvm::StackMaps::serializeToStackMapSection(), and SM.
Referenced by doFinalization().
void AsmPrinter::emitStackSizeSection | ( | const MachineFunction & | MF | ) |
Definition at line 1591 of file AsmPrinter.cpp.
References llvm::TargetOptions::EmitStackSizeSection, getCurrentSection(), llvm::MachineFunction::getFrameInfo(), getFunctionBegin(), getObjFileLowering(), llvm::TargetMachine::getProgramPointerSize(), llvm::MachineFrameInfo::getStackSize(), llvm::MCObjectFileInfo::getStackSizesSection(), llvm::MachineFunction::getTarget(), llvm::MachineFrameInfo::getUnsafeStackSize(), llvm::MachineFrameInfo::hasVarSizedObjects(), MF, llvm::TargetMachine::Options, OutStreamer, and TM.
Referenced by emitFunctionBody().
void AsmPrinter::emitStackUsage | ( | const MachineFunction & | MF | ) |
Definition at line 1617 of file AsmPrinter.cpp.
References llvm::errs(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getName(), llvm::Module::getName(), llvm::GlobalValue::getParent(), llvm::MachineFrameInfo::getStackSize(), llvm::Function::getSubprogram(), llvm::MachineFunction::getTarget(), llvm::MachineFrameInfo::getUnsafeStackSize(), llvm::MachineFrameInfo::hasVarSizedObjects(), MF, llvm::sys::fs::OF_Text, llvm::TargetMachine::Options, OutputFilename, and llvm::TargetOptions::StackUsageOutput.
Referenced by emitFunctionBody().
|
inlinevirtual |
This virtual method can be overridden by targets that want to emit something at the start of their file.
Reimplemented in llvm::AMDGPUAsmPrinter, llvm::ARMAsmPrinter, llvm::AVRAsmPrinter, llvm::CSKYAsmPrinter, llvm::HexagonAsmPrinter, llvm::M68kAsmPrinter, llvm::MipsAsmPrinter, llvm::SystemZAsmPrinter, and llvm::X86AsmPrinter.
Definition at line 537 of file AsmPrinter.h.
Referenced by doInitialization(), and llvm::SystemZAsmPrinter::emitStartOfAsmFile().
void AsmPrinter::EmitToStreamer | ( | MCStreamer & | S, |
const MCInst & | Inst | ||
) |
Definition at line 428 of file AsmPrinter.cpp.
References llvm::MCStreamer::emitInstruction(), and getSubtargetInfo().
Referenced by llvm::X86AsmPrinter::emitBasicBlockEnd(), llvm::AMDGPUAsmPrinter::emitInstruction(), llvm::R600AsmPrinter::emitInstruction(), llvm::ARMAsmPrinter::emitInstruction(), llvm::AVRAsmPrinter::emitInstruction(), llvm::LoongArchAsmPrinter::emitInstruction(), llvm::MipsAsmPrinter::emitInstruction(), llvm::SystemZAsmPrinter::emitInstruction(), llvm::WebAssemblyAsmPrinter::emitInstruction(), llvm::XtensaAsmPrinter::emitInstruction(), llvm::ARMAsmPrinter::emitJumpTableInsts(), emitNops(), llvm::HexagonAsmPrinter::EmitSled(), llvm::LoongArchAsmPrinter::emitSled(), llvm::CSKYAsmPrinter::EmitToStreamer(), llvm::LoongArchAsmPrinter::LowerSTATEPOINT(), and llvm::ARMAsmPrinter::runOnMachineFunction().
|
virtual |
Emit reference to a ttype global with a specified encoding.
Definition at line 120 of file AsmPrinterDwarf.cpp.
References getObjFileLowering(), GetSizeOfEncodedValue(), llvm::TargetLoweringObjectFile::getTTypeGlobalReference(), MMI, OutStreamer, and TM.
Referenced by llvm::EHStreamer::emitTypeInfos().
void AsmPrinter::emitULEB128 | ( | uint64_t | Value, |
const char * | Desc = nullptr , |
||
unsigned | PadTo = 0 |
||
) | const |
Emit the specified unsigned leb128 value.
Definition at line 3271 of file AsmPrinter.cpp.
References isVerbose(), and OutStreamer.
Referenced by llvm::DIEAbbrev::Emit(), emitCallSiteValue(), llvm::DwarfDebug::emitDebugLocEntryLocation(), emitDwarfAbbrev(), emitDwarfAbbrevs(), emitDwarfDIE(), llvm::EHStreamer::emitExceptionTable(), emitPCSections(), llvm::EHStreamer::emitTypeInfos(), llvm::APByteStreamer::emitULEB128(), llvm::DIEBaseTypeRef::emitValue(), llvm::DIEEntry::emitValue(), and llvm::DIELocList::emitValue().
void AsmPrinter::emitVisibility | ( | MCSymbol * | Sym, |
unsigned | Visibility, | ||
bool | IsDefinition = true |
||
) | const |
This emits visibility information about symbol, if this is supported by the target.
Definition at line 4296 of file AsmPrinter.cpp.
References llvm::MCAsmInfo::getHiddenDeclarationVisibilityAttr(), llvm::MCAsmInfo::getHiddenVisibilityAttr(), llvm::MCAsmInfo::getProtectedVisibilityAttr(), llvm::GlobalValue::HiddenVisibility, MAI, llvm::MCSA_Invalid, OutStreamer, llvm::GlobalValue::ProtectedVisibility, and Sym.
Referenced by doFinalization(), emitGlobalAlias(), emitGlobalVariable(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), and llvm::WebAssemblyAsmPrinter::emitGlobalVariable().
void AsmPrinter::emitXRayTable | ( | ) |
Emit a table with all XRay instrumentation points.
Definition at line 4449 of file AsmPrinter.cpp.
References llvm::MCSymbolRefExpr::create(), llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCContext::createLinkerPrivateSymbol(), llvm::MCBinaryExpr::createSub(), llvm::MCContext::createTempSymbol(), CurrentFnBegin, CurrentFnSym, F, llvm::MCAsmInfo::getCodePointerSize(), llvm::MCContext::getELFSection(), llvm::MachineFunction::getFunction(), llvm::MCContext::getMachOSection(), llvm::SectionKind::getReadOnly(), llvm::SectionKind::getReadOnlyWithRel(), llvm::MachineFunction::getSubtarget(), getSubtargetInfo(), llvm::MCSubtargetInfo::getTargetTriple(), llvm::TargetMachine::getTargetTriple(), llvm::Triple::isOSBinFormatMachO(), llvm_unreachable, MAI, MF, llvm::MCSection::NonUniqueID, llvm::TargetMachine::Options, OutContext, OutStreamer, llvm::MachO::S_ATTR_LIVE_SUPPORT, llvm::ELF::SHF_ALLOC, llvm::ELF::SHF_GROUP, llvm::ELF::SHF_LINK_ORDER, llvm::ELF::SHT_PROGBITS, Sleds, TM, and llvm::TargetOptions::XRayFunctionIndex.
Referenced by llvm::ARMAsmPrinter::runOnMachineFunction(), llvm::HexagonAsmPrinter::runOnMachineFunction(), llvm::LoongArchAsmPrinter::runOnMachineFunction(), llvm::MipsAsmPrinter::runOnMachineFunction(), and llvm::X86AsmPrinter::runOnMachineFunction().
|
inlinevirtual |
Targets can override this to change how global constants that are part of a C++ static/global constructor list are emitted.
Reimplemented in llvm::ARMAsmPrinter, and llvm::AVRAsmPrinter.
Definition at line 578 of file AsmPrinter.h.
References DL, and emitGlobalConstant().
Referenced by llvm::AVRAsmPrinter::emitXXStructor(), and emitXXStructorList().
|
virtual |
This method emits llvm.global_ctors
or llvm.global_dtors
list.
EmitXXStructorList - Emit the ctor or dtor list taking into account the init priority.
Definition at line 3175 of file AsmPrinter.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), DL, emitAlignment(), emitXXStructor(), llvm::SmallVectorBase< Size_T >::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), getObjFileLowering(), llvm::TargetLoweringObjectFile::getStaticCtorSection(), llvm::TargetLoweringObjectFile::getStaticDtorSection(), getSymbol(), llvm::GlobalValue::isDeclarationForLinker(), llvm::List, llvm::TargetMachine::Options, OutStreamer, preprocessXXStructorList(), TM, and llvm::TargetOptions::UseInitArray.
Referenced by emitSpecialLLVMGlobal().
|
inline |
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.
Definition at line 276 of file AsmPrinter.h.
References getAddrLabelSymbolToEmit().
Referenced by GetBlockAddressSymbol().
ArrayRef< MCSymbol * > AsmPrinter::getAddrLabelSymbolToEmit | ( | const BasicBlock * | BB | ) |
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.
Definition at line 286 of file AsmPrinter.cpp.
References OutContext.
Referenced by emitBasicBlockStart(), and getAddrLabelSymbol().
|
overridevirtual |
Record analysis usage.
Reimplemented from llvm::Pass.
Reimplemented in llvm::AMDGPUAsmPrinter, and llvm::NVPTXAsmPrinter.
Definition at line 450 of file AsmPrinter.cpp.
References llvm::AnalysisUsage::addRequired(), llvm::MachineFunctionPass::getAnalysisUsage(), and llvm::AnalysisUsage::setPreservesAll().
Referenced by llvm::AMDGPUAsmPrinter::getAnalysisUsage().
MCSymbol * AsmPrinter::GetBlockAddressSymbol | ( | const BasicBlock * | BB | ) | const |
Definition at line 4071 of file AsmPrinter.cpp.
References getAddrLabelSymbol().
MCSymbol * AsmPrinter::GetBlockAddressSymbol | ( | const BlockAddress * | BA | ) | const |
Return the MCSymbol used to satisfy BlockAddress uses of the specified basic block.
Definition at line 4066 of file AsmPrinter.cpp.
References getAddrLabelSymbol(), and llvm::BlockAddress::getBasicBlock().
Referenced by emitFunctionBody(), EmitInlineAsmStr(), llvm::ARMAsmPrinter::emitMachineConstantPoolValue(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), llvm::XtensaAsmPrinter::emitMachineConstantPoolValue(), llvm::LanaiMCInstLower::GetBlockAddressSymbol(), llvm::MSP430MCInstLower::GetBlockAddressSymbol(), llvm::SystemZMCInstLower::getExpr(), getMCSymbolForTOCPseudoMO(), llvm::HexagonLowerToMC(), lowerBlockAddressConstant(), llvm::AVRMCInstLower::lowerInstruction(), llvm::lowerLoongArchMachineOperandToMCOperand(), llvm::M68kMCInstLower::LowerOperand(), LowerOperand(), llvm::ARMAsmPrinter::lowerOperand(), llvm::AArch64MCInstLower::lowerOperand(), llvm::CSKYMCInstLower::lowerOperand(), llvm::LowerPPCMachineOperandToMCOperand(), LowerSymbolOperand(), llvm::XtensaAsmPrinter::LowerSymbolOperand(), llvm::M68kAsmPrinter::PrintAsmMemoryOperand(), llvm::CSKYAsmPrinter::PrintAsmOperand(), and llvm::MipsAsmPrinter::printOperand().
|
virtual |
Gets information required to create a CodeView debug symbol for a jump table.
Return value is <Base Address, Base Offset, Branch Address, Entry Size>
Reimplemented in llvm::ARMAsmPrinter.
Definition at line 4619 of file AsmPrinter.cpp.
References llvm::sampleprof::Base, llvm::MachineModuleInfo::getContext(), llvm::TargetLowering::getPICJumpTableRelocBaseExpr(), llvm::MachineFunction::getSubtarget(), llvm::TargetSubtargetInfo::getTargetLowering(), llvm::codeview::Int32, MF, and MMI.
Return the symbol for the specified constant pool entry.
GetCPISymbol - Return the symbol for the specified constant pool entry.
Reimplemented in llvm::ARMAsmPrinter.
Definition at line 4080 of file AsmPrinter.cpp.
References llvm::MachineConstantPoolEntry::Alignment, llvm::CallingConv::C, llvm::MachineConstantPoolEntry::ConstVal, DL, llvm::MachineFunction::getConstantPool(), llvm::MachineConstantPool::getConstants(), getDataLayout(), llvm::MachineFunction::getDataLayout(), getFunctionNumber(), getObjFileLowering(), llvm::MCContext::getOrCreateSymbol(), llvm::MachineConstantPoolEntry::getSectionKind(), getSubtargetInfo(), llvm::MachineConstantPoolEntry::isMachineConstantPoolEntry(), llvm::MCSA_Global, MF, OutContext, OutStreamer, Sym, and llvm::MachineConstantPoolEntry::Val.
Referenced by emitConstantPool(), llvm::MipsAsmPrinter::emitInstruction(), llvm::XtensaAsmPrinter::emitMachineConstantPoolEntry(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), llvm::XtensaAsmPrinter::emitMachineConstantPoolValue(), llvm::XtensaAsmPrinter::GetConstantPoolIndexSymbol(), llvm::SystemZMCInstLower::getExpr(), getMCSymbolForTOCPseudoMO(), llvm::HexagonLowerToMC(), llvm::BPFMCInstLower::Lower(), llvm::AVRMCInstLower::lowerInstruction(), llvm::lowerLoongArchMachineOperandToMCOperand(), llvm::M68kMCInstLower::LowerOperand(), LowerOperand(), llvm::AArch64MCInstLower::lowerOperand(), llvm::CSKYMCInstLower::lowerOperand(), llvm::LowerPPCMachineOperandToMCOperand(), LowerSymbolOperand(), llvm::HexagonAsmPrinter::printOperand(), and smallData().
Return the current section we are emitting to.
getCurrentSection() - Return the current section we are emitting to.
Definition at line 446 of file AsmPrinter.cpp.
References OutStreamer.
Referenced by emitAlignment(), and emitStackSizeSection().
const DataLayout & AsmPrinter::getDataLayout | ( | ) | const |
Return information about data layout.
Definition at line 412 of file AsmPrinter.cpp.
References assert(), llvm::Module::getDataLayout(), llvm::MachineModuleInfo::getModule(), and MMI.
Referenced by llvm::DwarfExpression::addConstantFP(), llvm::DwarfUnit::addConstantValue(), emitConstantPool(), llvm::DwarfDebug::emitDebugLocEntry(), llvm::X86AsmPrinter::emitEndOfAsmFile(), emitGlobalConstantFP(), emitGlobalConstantLargeInt(), llvm::ARMAsmPrinter::emitInstruction(), llvm::LoongArchAsmPrinter::emitJumpTableInfo(), llvm::ARMAsmPrinter::emitMachineConstantPoolValue(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), llvm::SystemZAsmPrinter::emitMachineConstantPoolValue(), llvm::XtensaAsmPrinter::emitMachineConstantPoolValue(), llvm::ARMAsmPrinter::emitXXStructor(), llvm::DwarfCFIException::endModule(), llvm::WasmException::endModule(), llvm::MSP430MCInstLower::GetConstantPoolIndexSymbol(), GetCPISymbol(), llvm::ARMAsmPrinter::GetCPISymbol(), GetExternalSymbolSymbol(), GetJTSetSymbol(), llvm::MSP430MCInstLower::GetJumpTableSymbol(), GetSymbolFromOperand(), lowerConstant(), and llvm::MipsAsmPrinter::printOperand().
|
inline |
Definition at line 237 of file AsmPrinter.h.
Referenced by llvm::DwarfDebug::emitDebugLocValue(), and llvm::DIELocList::emitValue().
|
inline |
Definition at line 238 of file AsmPrinter.h.
dwarf::FormParams AsmPrinter::getDwarfFormParams | ( | ) | const |
Returns information about the byte size of DW_FORM values.
Definition at line 4606 of file AsmPrinter.cpp.
References doesDwarfUseRelocationsAcrossSections(), llvm::MCAsmInfo::getCodePointerSize(), getDwarfVersion(), MAI, and OutStreamer.
Referenced by llvm::DwarfUnit::addBlock(), llvm::DwarfFile::computeSizeAndOffset(), llvm::DIEExpr::emitValue(), llvm::DIELabel::emitValue(), llvm::DIEDelta::emitValue(), and llvm::DIEEntry::emitValue().
unsigned int AsmPrinter::getDwarfOffsetByteSize | ( | ) | const |
Returns 4 for DWARF32 and 8 for DWARF64.
Definition at line 4601 of file AsmPrinter.cpp.
References llvm::dwarf::getDwarfOffsetByteSize(), and OutStreamer.
Referenced by emitDwarfLengthOrOffset(), emitDwarfOffset(), emitDwarfStringOffset(), emitDwarfSymbolReference(), llvm::DwarfUnit::getHeaderSize(), and llvm::DwarfTypeUnit::getHeaderSize().
uint16_t AsmPrinter::getDwarfVersion | ( | ) | const |
Definition at line 4589 of file AsmPrinter.cpp.
References OutStreamer.
Referenced by llvm::DIEAbbrev::Emit(), llvm::DwarfDebug::emitDebugLocValue(), llvm::DebugLocEntry::finalize(), getDwarfFormParams(), and llvm::DwarfDebug::getDwarfSectionOffsetForm().
Return the MCSymbol for the specified ExternalSymbol.
Definition at line 4127 of file AsmPrinter.cpp.
References getDataLayout(), llvm::Mangler::getNameWithPrefix(), llvm::MCContext::getOrCreateSymbol(), OutContext, and Sym.
Referenced by llvm::X86AsmPrinter::emitEndOfAsmFile(), emitGlobalVariable(), llvm::ARMAsmPrinter::emitInstruction(), llvm::ARMAsmPrinter::emitMachineConstantPoolValue(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), llvm::WasmException::endModule(), llvm::SystemZMCInstLower::getExpr(), llvm::AArch64MCInstLower::GetExternalSymbolSymbol(), llvm::BPFMCInstLower::GetExternalSymbolSymbol(), llvm::LanaiMCInstLower::GetExternalSymbolSymbol(), llvm::MSP430MCInstLower::GetExternalSymbolSymbol(), llvm::WebAssemblyAsmPrinter::getMCSymbolForFunction(), llvm::WebAssemblyAsmPrinter::getOrCreateWasmSymbol(), llvm::HexagonLowerToMC(), llvm::AVRMCInstLower::lowerInstruction(), llvm::lowerLoongArchMachineOperandToMCOperand(), LowerOperand(), llvm::ARMAsmPrinter::lowerOperand(), llvm::CSKYMCInstLower::lowerOperand(), LowerSymbolOperand(), llvm::XtensaAsmPrinter::LowerSymbolOperand(), llvm::WebAssemblyAsmPrinter::PrintAsmOperand(), and llvm::AVRAsmPrinter::printOperand().
|
inline |
Definition at line 266 of file AsmPrinter.h.
References CurrentFnBegin.
Referenced by llvm::DebugHandlerBase::beginFunction(), llvm::CodeViewDebug::beginFunctionImpl(), llvm::BTFDebug::beginFunctionImpl(), llvm::BTFDebug::beginInstruction(), llvm::EHStreamer::computeCallSiteTable(), emitBBAddrMapSection(), emitPCSections(), and emitStackSizeSection().
AsmPrinter::CFISection AsmPrinter::getFunctionCFISectionType | ( | const Function & | F | ) | const |
Get the CFISection type for a function.
Definition at line 1319 of file AsmPrinter.cpp.
References Debug, llvm::DwarfCFI, EH, F, llvm::TargetOptions::ForceDwarfFrameSection, llvm::MCAsmInfo::getExceptionHandlingType(), hasDebugInfo(), MAI, None, llvm::TargetMachine::Options, TM, and llvm::MCAsmInfo::usesCFIWithoutEH().
Referenced by llvm::DwarfCFIException::beginFunction(), llvm::ARMException::beginFunction(), doInitialization(), emitCFIInstruction(), and getFunctionCFISectionType().
AsmPrinter::CFISection AsmPrinter::getFunctionCFISectionType | ( | const MachineFunction & | MF | ) | const |
Get the CFISection type for a function.
Definition at line 1338 of file AsmPrinter.cpp.
References llvm::MachineFunction::getFunction(), getFunctionCFISectionType(), and MF.
|
inline |
Definition at line 267 of file AsmPrinter.h.
Referenced by emitPCSections(), and llvm::CodeViewDebug::endFunctionImpl().
Return symbol for the function pseudo stack if the stack frame is not a register based.
Reimplemented in llvm::NVPTXAsmPrinter.
Definition at line 264 of file AsmPrinter.h.
unsigned AsmPrinter::getFunctionNumber | ( | ) | const |
Return a unique ID for the current function.
getFunctionNumber - Return a unique ID for the current function.
Definition at line 404 of file AsmPrinter.cpp.
References llvm::MachineFunction::getFunctionNumber(), and MF.
Referenced by emitBasicBlockLoopComments(), llvm::AMDGPUAsmPrinter::emitBasicBlockStart(), llvm::EHStreamer::emitExceptionTable(), llvm::ARMAsmPrinter::emitInstruction(), llvm::ARMAsmPrinter::emitMachineConstantPoolValue(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), llvm::LanaiMCInstLower::GetConstantPoolIndexSymbol(), llvm::MSP430MCInstLower::GetConstantPoolIndexSymbol(), GetCPISymbol(), llvm::ARMAsmPrinter::GetCPISymbol(), llvm::NVPTXAsmPrinter::getFunctionFrameSymbol(), GetJTSetSymbol(), llvm::LanaiMCInstLower::GetJumpTableSymbol(), llvm::MSP430MCInstLower::GetJumpTableSymbol(), llvm::MipsAsmPrinter::printOperand(), and PrintSpecial().
|
static |
Return the alignment for the specified GV
.
getGVAlignment - Return the alignment to use for the specified global value.
This rounds up to the preferred alignment if possible and legal.
Definition at line 361 of file AsmPrinter.cpp.
References assert(), DL, llvm::GlobalObject::getAlign(), and llvm::GlobalObject::hasSection().
Referenced by emitAlignment(), and emitGlobalVariable().
|
inlinevirtual |
getSubtargetInfo() cannot be used where this is needed because we don't have a MachineFunction when we're lowering a GlobalIFunc, and getSubtargetInfo requires one.
Override the implementation in targets that support the Mach-O IFunc lowering.
Definition at line 603 of file AsmPrinter.h.
|
inlinevirtual |
Get the value for DW_AT_APPLE_isa. Zero if no isa encoding specified.
Reimplemented in llvm::ARMAsmPrinter.
Definition at line 756 of file AsmPrinter.h.
Referenced by llvm::DwarfUnit::applySubprogramAttributes().
Return the symbol for the specified jump table entry.
GetJTISymbol - Return the symbol for the specified jump table entry.
Definition at line 4108 of file AsmPrinter.cpp.
References llvm::MachineFunction::getJTISymbol(), MF, and OutContext.
Referenced by emitJumpTableInfo(), llvm::LoongArchAsmPrinter::emitJumpTableInfo(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), llvm::XtensaAsmPrinter::emitMachineConstantPoolValue(), llvm::SystemZMCInstLower::getExpr(), llvm::XtensaAsmPrinter::GetJumpTableSymbol(), getMCSymbolForTOCPseudoMO(), llvm::HexagonLowerToMC(), llvm::AVRMCInstLower::lowerInstruction(), llvm::lowerLoongArchMachineOperandToMCOperand(), llvm::M68kMCInstLower::LowerOperand(), LowerOperand(), llvm::ARMAsmPrinter::lowerOperand(), llvm::AArch64MCInstLower::lowerOperand(), llvm::CSKYMCInstLower::lowerOperand(), llvm::LowerPPCMachineOperandToMCOperand(), and smallData().
Return the symbol for the specified jump table .set FIXME: privatize to AsmPrinter.
GetJTSetSymbol - Return the symbol for the specified jump table .set FIXME: privatize to AsmPrinter.
Definition at line 4114 of file AsmPrinter.cpp.
References DL, getDataLayout(), getFunctionNumber(), llvm::MCContext::getOrCreateSymbol(), and OutContext.
Referenced by emitJumpTableInfo().
MCSymbol * AsmPrinter::getMBBExceptionSym | ( | const MachineBasicBlock & | MBB | ) |
Definition at line 2710 of file AsmPrinter.cpp.
References createTempSymbol(), llvm::MachineBasicBlock::getSectionID(), and MBB.
Referenced by llvm::DwarfCFIException::beginBasicBlockSection(), llvm::EHStreamer::computeCallSiteTable(), llvm::EHStreamer::emitExceptionTable(), and llvm::ARMAsmPrinter::emitMachineConstantPoolValue().
|
inline |
Get the CFISection type for the module.
Definition at line 434 of file AsmPrinter.h.
Referenced by llvm::DwarfCFIException::beginBasicBlockSection(), and llvm::ARMException::beginFunction().
void AsmPrinter::getNameWithPrefix | ( | SmallVectorImpl< char > & | Name, |
const GlobalValue * | GV | ||
) | const |
Definition at line 696 of file AsmPrinter.cpp.
References llvm::TargetMachine::getNameWithPrefix(), getObjFileLowering(), Name, and TM.
Referenced by llvm::AMDGPUAsmPrinter::emitFunctionBodyEnd(), llvm::AMDGPUAsmPrinter::emitFunctionEntryLabel(), llvm::M68kMCInstLower::GetSymbolFromOperand(), and AMDGPUMCInstLower::lowerOperand().
const TargetLoweringObjectFile & AsmPrinter::getObjFileLowering | ( | ) | const |
Return information about object file lowering.
Definition at line 408 of file AsmPrinter.cpp.
References llvm::TargetMachine::getObjFileLowering(), and TM.
Referenced by llvm::DwarfCompileUnit::addAddrTableBase(), llvm::DwarfDebug::addDwarfTypeUnitType(), llvm::DwarfCompileUnit::addLocationAttribute(), llvm::DwarfUnit::addRnglistsBase(), llvm::DwarfCompileUnit::addScopeRangeList(), llvm::DwarfUnit::addStringOffsetsStart(), llvm::DwarfCompileUnit::applyStmtList(), llvm::DwarfCFIException::beginBasicBlockSection(), llvm::WinException::beginFunclet(), llvm::DwarfCFIException::beginFunction(), llvm::WinException::beginFunction(), llvm::CodeViewDebug::beginModule(), computeGlobalGOTEquivs(), doFinalization(), llvm::AMDGPUAsmPrinter::doFinalization(), llvm::AVRAsmPrinter::doFinalization(), doInitialization(), emitBasicBlockStart(), emitBBAddrMapSection(), llvm::DwarfUnit::emitCommonHeader(), emitConstantPool(), llvm::XtensaAsmPrinter::emitConstantPool(), llvm::ARMAsmPrinter::emitEndOfAsmFile(), llvm::X86AsmPrinter::emitEndOfAsmFile(), llvm::EHStreamer::emitExceptionTable(), llvm::SystemZAsmPrinter::emitFunctionBodyEnd(), emitGlobalAlias(), emitGlobalConstantImpl(), emitGlobalGOTEquivs(), emitGlobalVariable(), emitJumpTableInfo(), emitKCFITrapEntry(), emitPCSections(), emitStackSizeSection(), llvm::MipsAsmPrinter::emitStartOfAsmFile(), llvm::X86AsmPrinter::emitStartOfAsmFile(), emitTTypeReference(), emitXXStructorList(), llvm::DwarfCFIException::endModule(), GetCPISymbol(), llvm::AArch64MCInstLower::GetGlobalValueSymbol(), getNameWithPrefix(), getSymbolWithGlobalValueBase(), handleIndirectSymViaGOTPCRel(), llvm::DwarfCompileUnit::initStmtList(), lowerConstant(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), llvm::R600AsmPrinter::runOnMachineFunction(), SetupMachineFunction(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
unsigned AsmPrinter::getPointerSize | ( | ) | const |
Return the pointer size from the TargetMachine.
Definition at line 419 of file AsmPrinter.cpp.
References llvm::TargetMachine::getPointerSize(), and TM.
Referenced by emitBBAddrMapSection(), emitPatchableFunctionEntries(), and emitPCSections().
Return the size of the encoding in bytes.
GetSizeOfEncodedValue - Return the size of the encoding in bytes.
Definition at line 102 of file AsmPrinterDwarf.cpp.
References llvm::dwarf::DW_EH_PE_absptr, llvm::dwarf::DW_EH_PE_omit, llvm::dwarf::DW_EH_PE_udata2, llvm::dwarf::DW_EH_PE_udata4, llvm::dwarf::DW_EH_PE_udata8, llvm::MCAsmInfo::getCodePointerSize(), llvm_unreachable, and MAI.
Referenced by emitCallSiteOffset(), emitCallSiteValue(), llvm::EHStreamer::emitExceptionTable(), and emitTTypeReference().
const MCSubtargetInfo & AsmPrinter::getSubtargetInfo | ( | ) | const |
Return information about subtarget.
Definition at line 423 of file AsmPrinter.cpp.
References assert(), llvm::MachineFunction::getSubtarget(), and MF.
Referenced by emitAlignment(), llvm::X86AsmPrinter::emitBasicBlockEnd(), emitFunctionBody(), llvm::R600AsmPrinter::emitInstruction(), llvm::ARMAsmPrinter::emitInstruction(), llvm::AVRAsmPrinter::emitInstruction(), llvm::CSKYAsmPrinter::emitInstruction(), llvm::HexagonAsmPrinter::emitInstruction(), llvm::LoongArchAsmPrinter::emitInstruction(), llvm::M68kAsmPrinter::emitInstruction(), llvm::SystemZAsmPrinter::emitInstruction(), llvm::X86AsmPrinter::emitInstruction(), llvm::LoongArchAsmPrinter::emitSled(), EmitToStreamer(), emitXRayTable(), GetCPISymbol(), and llvm::HexagonAsmPrinter::HexagonProcessInstruction().
MCSymbol * AsmPrinter::getSymbol | ( | const GlobalValue * | GV | ) | const |
Definition at line 701 of file AsmPrinter.cpp.
References llvm::TargetMachine::getSymbol(), and TM.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), computeGlobalGOTEquivs(), doFinalization(), llvm::WebAssemblyAsmPrinter::emitDecls(), llvm::WebAssemblyAsmPrinter::emitEndOfAsmFile(), llvm::WebAssemblyAsmPrinter::EmitFunctionAttributes(), emitGlobalAlias(), emitGlobalAliasInline(), emitGlobalConstant(), emitGlobalVariable(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::WebAssemblyAsmPrinter::emitGlobalVariable(), llvm::ARMAsmPrinter::emitMachineConstantPoolValue(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), llvm::SystemZAsmPrinter::emitMachineConstantPoolValue(), emitSpecialLLVMGlobal(), emitXXStructorList(), llvm::ARMException::endFunction(), llvm::DwarfCFIException::endModule(), llvm::WinCFGuard::endModule(), llvm::WinException::endModule(), llvm::SystemZMCInstLower::getExpr(), llvm::BPFMCInstLower::GetGlobalAddressSymbol(), llvm::LanaiMCInstLower::GetGlobalAddressSymbol(), llvm::MSP430MCInstLower::GetGlobalAddressSymbol(), llvm::AArch64MCInstLower::GetGlobalValueSymbol(), llvm::WebAssemblyAsmPrinter::getMCSymbolForFunction(), getMCSymbolForTOCPseudoMO(), GetSymbolFromOperand(), handleIndirectSymViaGOTPCRel(), llvm::HexagonLowerToMC(), lowerConstant(), llvm::AVRAsmPrinter::lowerConstant(), llvm::AVRMCInstLower::lowerInstruction(), LowerOperand(), llvm::CSKYMCInstLower::lowerOperand(), LowerSymbolOperand(), llvm::XtensaAsmPrinter::LowerSymbolOperand(), llvm::AVRAsmPrinter::printOperand(), SetupMachineFunction(), and smallData().
MCSymbol * AsmPrinter::getSymbolPreferLocal | ( | const GlobalValue & | GV | ) | const |
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.
Definition at line 705 of file AsmPrinter.cpp.
References llvm::GlobalValue::canBenefitFromLocalAlias(), llvm::PIELevel::Default, llvm::GlobalValue::getParent(), llvm::TargetMachine::getRelocationModel(), llvm::TargetMachine::getSymbol(), getSymbolWithGlobalValueBase(), llvm::TargetMachine::getTargetTriple(), llvm::GlobalValue::isDSOLocal(), llvm::Triple::isOSBinFormatELF(), llvm::Reloc::Static, and TM.
Referenced by emitFunctionEntryLabel(), emitGlobalAlias(), emitGlobalVariable(), llvm::WebAssemblyAsmPrinter::emitGlobalVariable(), llvm::AArch64MCInstLower::GetGlobalValueSymbol(), llvm::M68kMCInstLower::GetSymbolFromOperand(), llvm::lowerLoongArchMachineOperandToMCOperand(), and PrintSymbolOperand().
MCSymbol * AsmPrinter::getSymbolWithGlobalValueBase | ( | const GlobalValue * | GV, |
StringRef | Suffix | ||
) | const |
Return the MCSymbol for a private symbol with global value name as its base, with the specified suffix.
Definition at line 4121 of file AsmPrinter.cpp.
References getObjFileLowering(), llvm::TargetLoweringObjectFile::getSymbolWithGlobalValueBase(), and TM.
Referenced by getSymbolPreferLocal().
unsigned int AsmPrinter::getUnitLengthFieldByteSize | ( | ) | const |
Returns 4 for DWARF32 and 12 for DWARF64.
Definition at line 4612 of file AsmPrinter.cpp.
References llvm::dwarf::getUnitLengthFieldByteSize(), and OutStreamer.
Referenced by llvm::DwarfFile::computeSizeAndOffsetsForUnit(), and llvm::DwarfCompileUnit::getLength().
|
inline |
Returns true if valid debug info is present.
Definition at line 437 of file AsmPrinter.h.
Referenced by llvm::DebugHandlerBase::beginInstruction(), llvm::CodeViewDebug::beginModule(), llvm::NVPTXAsmPrinter::doFinalization(), doInitialization(), llvm::DebugHandlerBase::endInstruction(), llvm::CodeViewDebug::endModule(), llvm::DwarfDebug::endModule(), and getFunctionCFISectionType().
|
virtual |
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.
isBlockOnlyReachableByFallthough - 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.
Reimplemented in llvm::HexagonAsmPrinter.
Definition at line 4336 of file AsmPrinter.cpp.
References llvm::MachineBasicBlock::empty(), llvm::MachineBasicBlock::isEHPad(), llvm::MachineBasicBlock::isLayoutSuccessor(), MBB, MI, OP, llvm::MachineBasicBlock::pred_begin(), llvm::MachineBasicBlock::pred_empty(), llvm::MachineBasicBlock::pred_size(), and llvm::MachineBasicBlock::terminators().
Referenced by llvm::AMDGPUAsmPrinter::emitBasicBlockStart(), and llvm::HexagonAsmPrinter::isBlockOnlyReachableByFallthrough().
bool AsmPrinter::isDwarf64 | ( | ) | const |
Definition at line 4597 of file AsmPrinter.cpp.
References llvm::dwarf::DWARF64, and OutStreamer.
Referenced by llvm::DwarfFile::computeSizeAndOffsets(), emitDwarfLengthOrOffset(), emitDwarfSymbolReference(), and llvm::DwarfDebug::getDwarfSectionOffsetForm().
bool AsmPrinter::isPositionIndependent | ( | ) | const |
Definition at line 399 of file AsmPrinter.cpp.
References llvm::TargetMachine::isPositionIndependent(), and TM.
Referenced by llvm::EHStreamer::emitExceptionTable(), llvm::ARMAsmPrinter::emitJumpTableAddrs(), llvm::MipsAsmPrinter::emitStartOfAsmFile(), llvm::WasmException::endModule(), and llvm::WebAssemblyAsmPrinter::getOrCreateWasmSymbol().
|
inline |
Return true if assembly output should contain comments.
Definition at line 257 of file AsmPrinter.h.
Referenced by emitBasicBlockStart(), emitDwarfDIE(), emitEncodingByte(), emitFunctionBody(), emitGlobalConstantDataSequential(), emitGlobalConstantFP(), emitGlobalConstantImpl(), emitGlobalVariable(), llvm::AMDGPUAsmPrinter::emitInstruction(), llvm::WebAssemblyAsmPrinter::emitInstruction(), emitSLEB128(), emitULEB128(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), and llvm::R600AsmPrinter::runOnMachineFunction().
|
virtual |
Lower the specified BlockAddress to an MCExpr.
Definition at line 4075 of file AsmPrinter.cpp.
References llvm::MCSymbolRefExpr::create(), GetBlockAddressSymbol(), and OutContext.
Referenced by lowerConstant().
Lower the specified LLVM Constant to an MCExpr.
Reimplemented in llvm::AMDGPUAsmPrinter, llvm::R600AsmPrinter, and llvm::AVRAsmPrinter.
Definition at line 3349 of file AsmPrinter.cpp.
References llvm::sampleprof::Base, llvm::CallingConv::C, llvm::ConstantFoldConstant(), llvm::ConstantFoldIntegerCast(), llvm::MCSymbolRefExpr::create(), llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCBinaryExpr::createSub(), DL, getDataLayout(), llvm::MachineFunction::getFunction(), getObjFileLowering(), llvm::GlobalValue::getParent(), llvm::APInt::getSExtValue(), getSymbol(), llvm::Value::getType(), llvm::IsConstantOffsetFromGlobal(), llvm::TargetMachine::isNoopAddrSpaceCast(), llvm::Constant::isNullValue(), LHS, llvm_unreachable, lowerBlockAddressConstant(), lowerConstant(), lowerConstantPtrAuth(), llvm::TargetLoweringObjectFile::lowerDSOLocalEquivalent(), llvm::TargetLoweringObjectFile::lowerRelativeReference(), MF, NC, llvm::Offset, OS, OutContext, llvm::report_fatal_error(), RHS, and TM.
Referenced by llvm::WebAssemblyAsmPrinter::emitFunctionBodyStart(), emitGlobalAlias(), emitGlobalConstantImpl(), llvm::XtensaAsmPrinter::emitMachineConstantPoolEntry(), lowerConstant(), llvm::AMDGPUAsmPrinter::lowerConstant(), llvm::R600AsmPrinter::lowerConstant(), and llvm::AVRAsmPrinter::lowerConstant().
|
inlinevirtual |
Definition at line 582 of file AsmPrinter.h.
References llvm::report_fatal_error().
Referenced by lowerConstant().
bool AsmPrinter::needsSEHMoves | ( | ) |
Definition at line 1342 of file AsmPrinter.cpp.
References llvm::MachineFunction::getFunction(), MAI, MF, llvm::Function::needsUnwindTableEntry(), and llvm::MCAsmInfo::usesWindowsCFI().
Referenced by llvm::WinException::beginFunction().
void AsmPrinter::preprocessXXStructorList | ( | const DataLayout & | DL, |
const Constant * | List, | ||
SmallVector< Structor, 8 > & | Structors | ||
) |
This method gathers an array of Structors and then sorts them out by Priority.
List | The initializer of llvm.global_ctors or llvm.global_dtors array. | |
[out] | Structors | Sorted Structor structs by Priority. |
Definition at line 3138 of file AsmPrinter.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::back(), llvm::AsmPrinter::Structor::ComdatKey, llvm::AsmPrinter::Structor::Func, llvm::ConstantInt::getLimitedValue(), llvm::User::getOperand(), llvm::TargetMachine::getTargetTriple(), llvm::Triple::isOSAIX(), llvm::List, llvm::AsmPrinter::Structor::Priority, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::report_fatal_error(), llvm::stable_sort(), and TM.
Referenced by emitXXStructorList().
|
virtual |
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.
Reimplemented in llvm::X86AsmPrinter, llvm::CSKYAsmPrinter, llvm::HexagonAsmPrinter, llvm::LoongArchAsmPrinter, llvm::M68kAsmPrinter, llvm::SystemZAsmPrinter, llvm::WebAssemblyAsmPrinter, llvm::XtensaAsmPrinter, llvm::ARMAsmPrinter, llvm::AVRAsmPrinter, and llvm::MipsAsmPrinter.
Definition at line 505 of file AsmPrinterInlineAsm.cpp.
Referenced by EmitInlineAsmStr(), llvm::CSKYAsmPrinter::PrintAsmMemoryOperand(), llvm::M68kAsmPrinter::PrintAsmMemoryOperand(), llvm::WebAssemblyAsmPrinter::PrintAsmMemoryOperand(), and PrintAsmOperand().
|
virtual |
Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant.
PrintAsmOperand - 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.
Targets should override this to format as appropriate for machine specific ExtraCodes or when the arch-independent handling would be too complex otherwise.
Reimplemented in llvm::AMDGPUAsmPrinter, llvm::MipsAsmPrinter, llvm::X86AsmPrinter, llvm::XtensaAsmPrinter, llvm::CSKYAsmPrinter, llvm::HexagonAsmPrinter, llvm::LoongArchAsmPrinter, llvm::M68kAsmPrinter, llvm::SystemZAsmPrinter, llvm::WebAssemblyAsmPrinter, llvm::ARMAsmPrinter, and llvm::AVRAsmPrinter.
Definition at line 463 of file AsmPrinterInlineAsm.cpp.
References llvm::MachineOperand::getImm(), llvm::MachineOperand::isGlobal(), llvm::MachineOperand::isImm(), llvm::MachineOperand::isReg(), MI, PrintAsmMemoryOperand(), and PrintSymbolOperand().
Referenced by EmitInlineAsmStr(), llvm::AMDGPUAsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::PrintAsmOperand(), llvm::X86AsmPrinter::PrintAsmOperand(), llvm::XtensaAsmPrinter::PrintAsmOperand(), llvm::CSKYAsmPrinter::PrintAsmOperand(), llvm::HexagonAsmPrinter::PrintAsmOperand(), llvm::LoongArchAsmPrinter::PrintAsmOperand(), llvm::M68kAsmPrinter::PrintAsmOperand(), llvm::SystemZAsmPrinter::PrintAsmOperand(), llvm::WebAssemblyAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), and llvm::AVRAsmPrinter::PrintAsmOperand().
void AsmPrinter::printOffset | ( | int64_t | Offset, |
raw_ostream & | OS | ||
) | const |
This is just convenient handler for printing offsets.
Definition at line 4045 of file AsmPrinter.cpp.
References llvm::Offset, and OS.
Referenced by llvm::WebAssemblyAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintSymbolOperand(), and PrintSymbolOperand().
|
virtual |
Print information related to the specified machine instr that is independent of the operand, and may be independent of the instr itself.
PrintSpecial - 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.
Definition at line 426 of file AsmPrinterInlineAsm.cpp.
References DL, llvm::MCAsmInfo::getCommentString(), llvm::MachineFunction::getDataLayout(), getFunctionNumber(), MAI, MF, MI, OS, llvm::report_fatal_error(), and llvm::raw_string_ostream::str().
Referenced by EmitInlineAsmStr().
|
virtual |
Print the MachineOperand as a symbol.
Targets with complex handling of symbol references should override the base implementation.
Reimplemented in llvm::ARMAsmPrinter.
Definition at line 453 of file AsmPrinterInlineAsm.cpp.
References assert(), llvm::MachineOperand::getGlobal(), llvm::MachineOperand::getOffset(), getSymbolPreferLocal(), llvm::MachineOperand::isGlobal(), MAI, OS, llvm::MCSymbol::print(), and printOffset().
Referenced by llvm::M68kAsmPrinter::PrintAsmMemoryOperand(), PrintAsmOperand(), llvm::CSKYAsmPrinter::PrintAsmOperand(), llvm::LoongArchAsmPrinter::PrintAsmOperand(), llvm::WebAssemblyAsmPrinter::PrintAsmOperand(), llvm::AVRAsmPrinter::PrintAsmOperand(), llvm::MipsAsmPrinter::printOperand(), and llvm::HexagonAsmPrinter::printOperand().
void AsmPrinter::recordSled | ( | MCSymbol * | Sled, |
const MachineInstr & | MI, | ||
SledKind | Kind, | ||
uint8_t | Version = 0 |
||
) |
Definition at line 4541 of file AsmPrinter.cpp.
References CurrentFnSym, F, FUNCTION_ENTER, LOG_ARGS_ENTER, MI, Sleds, and llvm::Version.
Referenced by llvm::HexagonAsmPrinter::EmitSled(), and llvm::LoongArchAsmPrinter::emitSled().
|
inlineoverridevirtual |
Emit the specified function out to the OutStreamer.
Implements llvm::MachineFunctionPass.
Reimplemented in llvm::ARMAsmPrinter, llvm::NVPTXAsmPrinter, llvm::HexagonAsmPrinter, llvm::AMDGPUAsmPrinter, llvm::R600AsmPrinter, llvm::CSKYAsmPrinter, llvm::LoongArchAsmPrinter, llvm::M68kAsmPrinter, llvm::MipsAsmPrinter, llvm::SystemZAsmPrinter, llvm::WebAssemblyAsmPrinter, and llvm::X86AsmPrinter.
Definition at line 387 of file AsmPrinter.h.
References emitFunctionBody(), MF, and SetupMachineFunction().
Referenced by llvm::NVPTXAsmPrinter::runOnMachineFunction(), llvm::HexagonAsmPrinter::runOnMachineFunction(), llvm::CSKYAsmPrinter::runOnMachineFunction(), llvm::LoongArchAsmPrinter::runOnMachineFunction(), llvm::M68kAsmPrinter::runOnMachineFunction(), and llvm::MipsAsmPrinter::runOnMachineFunction().
|
inline |
Definition at line 326 of file AsmPrinter.h.
References llvm::Enable.
void AsmPrinter::setDwarfVersion | ( | uint16_t | Version | ) |
Definition at line 4593 of file AsmPrinter.cpp.
References OutStreamer, and llvm::Version.
|
virtual |
This should be called when a new MachineFunction is being processed from runOnMachineFunction.
Definition at line 2717 of file AsmPrinter.cpp.
References assert(), llvm::TargetOptions::BBAddrMap, createTempSymbol(), CurrentFnBegin, CurrentFnBeginLocal, CurrentFnDescSym, CurrentFnSym, CurrentFnSymForSize, llvm::TargetOptions::EmitStackSizeSection, F, llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::TargetLoweringObjectFile::getFunctionEntryPointSymbol(), getObjFileLowering(), getSymbol(), llvm::MachineFunction::getTarget(), llvm::TargetMachine::getTargetTriple(), llvm::Triple::isOSAIX(), MAI, MBBSectionRanges, MF, needFuncLabels(), llvm::MCAsmInfo::needsFunctionDescriptors(), llvm::MCAsmInfo::needsLocalForSize(), llvm::MachineFrameInfo::needsSplitStackProlog(), llvm::TargetMachine::Options, ORE, llvm::MachineFunction::shouldSplitStack(), and TM.
Referenced by llvm::ARMAsmPrinter::runOnMachineFunction(), runOnMachineFunction(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), llvm::R600AsmPrinter::runOnMachineFunction(), and llvm::X86AsmPrinter::runOnMachineFunction().
|
inlineprotectedvirtual |
Reimplemented in llvm::X86AsmPrinter.
Definition at line 916 of file AsmPrinter.h.
Referenced by doFinalization().
void AsmPrinter::takeDeletedSymbolsForFunction | ( | const Function * | F, |
std::vector< MCSymbol * > & | Result | ||
) |
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.
Definition at line 294 of file AsmPrinter.cpp.
References F.
bool AsmPrinter::usesCFIWithoutEH | ( | ) | const |
Since emitting CFI unwind information is entangled with supporting the exceptions, this returns true for platforms which use CFI unwind information for other purposes (debugging, sanitizers, ...) when MCAsmInfo::ExceptionsType == ExceptionHandling::None
.
Definition at line 1346 of file AsmPrinter.cpp.
References MAI, None, and llvm::MCAsmInfo::usesCFIWithoutEH().
Referenced by llvm::DwarfCFIException::beginFunction(), doInitialization(), and emitCFIInstruction().
|
protected |
Definition at line 185 of file AsmPrinter.h.
Referenced by emitFunctionBody(), llvm::X86AsmPrinter::emitInstruction(), emitXRayTable(), getFunctionBegin(), and SetupMachineFunction().
|
protected |
For dso_local functions, the current $local alias for the function.
Definition at line 188 of file AsmPrinter.h.
Referenced by emitFunctionBody(), emitFunctionEntryLabel(), and SetupMachineFunction().
MCSymbol* llvm::AsmPrinter::CurrentFnDescSym = nullptr |
The symbol for the current function descriptor on AIX.
This is created at the beginning of each call to SetupMachineFunction().
Definition at line 127 of file AsmPrinter.h.
Referenced by SetupMachineFunction().
MCSymbol* llvm::AsmPrinter::CurrentFnSym = nullptr |
The symbol for the current function.
This is recalculated at the beginning of each call to runOnMachineFunction().
Definition at line 123 of file AsmPrinter.h.
Referenced by llvm::WinException::beginFunction(), llvm::EHStreamer::emitExceptionTable(), emitFunctionBody(), llvm::MipsAsmPrinter::emitFunctionBodyEnd(), llvm::WebAssemblyAsmPrinter::emitFunctionBodyStart(), llvm::X86AsmPrinter::emitFunctionBodyStart(), emitFunctionEntryLabel(), llvm::ARMAsmPrinter::emitFunctionEntryLabel(), llvm::MipsAsmPrinter::emitFunctionEntryLabel(), emitPatchableFunctionEntries(), llvm::PseudoProbeHandler::emitPseudoProbe(), emitXRayTable(), llvm::FaultMaps::recordFaultingOp(), recordSled(), llvm::ARMAsmPrinter::runOnMachineFunction(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), llvm::X86AsmPrinter::runOnMachineFunction(), and SetupMachineFunction().
MCSymbol* llvm::AsmPrinter::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.
Definition at line 132 of file AsmPrinter.h.
Referenced by emitFunctionBody(), llvm::FaultMaps::recordFaultingOp(), and SetupMachineFunction().
MCSymbol* llvm::AsmPrinter::CurrentPatchableFunctionEntrySym = nullptr |
The symbol for the entry in __patchable_function_entires.
Definition at line 119 of file AsmPrinter.h.
Referenced by llvm::X86AsmPrinter::emitInstruction(), and emitPatchableFunctionEntries().
|
protected |
Debuginfo handler. Protected so that targets can add their own.
Definition at line 196 of file AsmPrinter.h.
Referenced by addDebugHandler(), doFinalization(), doInitialization(), emitBasicBlockEnd(), emitBasicBlockStart(), emitFunctionBody(), and emitGlobalVariable().
MapVector<const MCSymbol *, GOTEquivUsePair> llvm::AsmPrinter::GlobalGOTEquivs |
Definition at line 145 of file AsmPrinter.h.
Referenced by computeGlobalGOTEquivs(), emitGlobalGOTEquivs(), emitGlobalVariable(), and handleIndirectSymViaGOTPCRel().
|
protected |
A vector of all debug/EH info emitters we should use.
This vector maintains ownership of the emitters.
Definition at line 192 of file AsmPrinter.h.
Referenced by addAsmPrinterHandler(), doFinalization(), doInitialization(), emitBasicBlockEnd(), emitBasicBlockStart(), emitFunctionBody(), and ~AsmPrinter().
Target Asm Printer information.
Definition at line 92 of file AsmPrinter.h.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), AsmPrinter(), llvm::ARMException::beginFunction(), llvm::WinException::beginFunction(), llvm::EHStreamer::computeCallSiteTable(), doFinalization(), doInitialization(), emitBasicBlockStart(), emitCFIInstruction(), llvm::DwarfUnit::emitCommonHeader(), llvm::DwarfDebug::emitDebugLocEntry(), emitDwarfSymbolReference(), llvm::X86AsmPrinter::emitEndOfAsmFile(), llvm::EHStreamer::emitExceptionTable(), emitFunctionBody(), emitFunctionEntryLabel(), emitGlobalAlias(), emitGlobalConstant(), emitGlobalVariable(), EmitInlineAsmStr(), emitJumpTableInfo(), llvm::X86AsmPrinter::emitKCFITypeId(), emitLabelPlusOffset(), emitLinkage(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), emitPatchableFunctionEntries(), emitSpecialLLVMGlobal(), emitVisibility(), emitXRayTable(), llvm::ARMException::endFunction(), llvm::DwarfCFIException::endModule(), llvm::LanaiMCInstLower::GetConstantPoolIndexSymbol(), getDwarfFormParams(), getFunctionCFISectionType(), llvm::LanaiMCInstLower::GetJumpTableSymbol(), GetSizeOfEncodedValue(), needsSEHMoves(), llvm::M68kAsmPrinter::PrintAsmMemoryOperand(), llvm::SystemZAsmPrinter::PrintAsmMemoryOperand(), llvm::CSKYAsmPrinter::PrintAsmOperand(), llvm::SystemZAsmPrinter::PrintAsmOperand(), llvm::WebAssemblyAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::MipsAsmPrinter::printOperand(), llvm::HexagonAsmPrinter::printOperand(), PrintSpecial(), llvm::ARMAsmPrinter::PrintSymbolOperand(), PrintSymbolOperand(), SetupMachineFunction(), and usesCFIWithoutEH().
MapVector<MBBSectionID, MBBSectionRange> llvm::AsmPrinter::MBBSectionRanges |
Definition at line 140 of file AsmPrinter.h.
Referenced by llvm::DwarfCompileUnit::attachRangesOrLowHighPC(), llvm::EHStreamer::computeCallSiteTable(), emitBBAddrMapSection(), emitFunctionBody(), llvm::DwarfDebug::endFunctionImpl(), SetupMachineFunction(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
MachineDominatorTree* llvm::AsmPrinter::MDT = nullptr |
This is a pointer to the current MachineDominatorTree.
Definition at line 110 of file AsmPrinter.h.
Referenced by emitFunctionBody().
MachineFunction* llvm::AsmPrinter::MF = nullptr |
The current machine function.
Definition at line 104 of file AsmPrinter.h.
Referenced by llvm::DwarfCompileUnit::addAddress(), llvm::DwarfCompileUnit::addComplexAddress(), llvm::WinException::beginFunclet(), llvm::DebugHandlerBase::beginFunction(), llvm::CodeViewDebug::beginInstruction(), llvm::EHStreamer::computeActionsTable(), llvm::EHStreamer::computeCallSiteTable(), llvm::WasmException::computeCallSiteTable(), doFinalization(), emitAlignment(), emitBasicBlockStart(), emitBBAddrMapSection(), emitCFIInstruction(), emitConstantPool(), llvm::WebAssemblyAsmPrinter::emitConstantPool(), llvm::XtensaAsmPrinter::emitConstantPool(), llvm::DwarfDebug::emitDebugLocValue(), emitDebugValueComment(), llvm::EHStreamer::emitExceptionTable(), emitFakeUse(), llvm::MipsAsmPrinter::emitFrameDirective(), emitFunctionBody(), llvm::AMDGPUAsmPrinter::emitFunctionBodyEnd(), llvm::AMDGPUAsmPrinter::emitFunctionBodyStart(), llvm::MipsAsmPrinter::emitFunctionBodyStart(), llvm::WebAssemblyAsmPrinter::emitFunctionBodyStart(), llvm::X86AsmPrinter::emitFunctionBodyStart(), emitFunctionEntryLabel(), llvm::AMDGPUAsmPrinter::emitFunctionEntryLabel(), llvm::ARMAsmPrinter::emitFunctionEntryLabel(), llvm::MipsAsmPrinter::emitFunctionEntryLabel(), llvm::SystemZAsmPrinter::emitFunctionEntryLabel(), emitImplicitDef(), llvm::AMDGPUAsmPrinter::emitImplicitDef(), emitInitialRawDwarfLocDirective(), llvm::AMDGPUAsmPrinter::emitInstruction(), llvm::R600AsmPrinter::emitInstruction(), llvm::ARMAsmPrinter::emitInstruction(), llvm::HexagonAsmPrinter::emitInstruction(), llvm::MipsAsmPrinter::emitInstruction(), llvm::SystemZAsmPrinter::emitInstruction(), llvm::X86AsmPrinter::emitInstruction(), llvm::ARMAsmPrinter::emitJumpTableAddrs(), emitJumpTableInfo(), llvm::LoongArchAsmPrinter::emitJumpTableInfo(), llvm::ARMAsmPrinter::emitJumpTableInsts(), llvm::ARMAsmPrinter::emitJumpTableTBInst(), emitKCFITrapEntry(), emitKCFITypeId(), llvm::X86AsmPrinter::emitKCFITypeId(), emitKill(), llvm::ARMAsmPrinter::emitMachineConstantPoolValue(), emitNops(), emitPatchableFunctionEntries(), emitPCSections(), emitPCSectionsLabel(), emitStackSizeSection(), emitStackUsage(), llvm::EHStreamer::emitTypeInfos(), emitXRayTable(), llvm::ARMException::endFunction(), getCodeViewJumpTableInfo(), GetCPISymbol(), getFunctionCFISectionType(), getFunctionNumber(), GetJTISymbol(), getSubtargetInfo(), llvm::HexagonAsmPrinter::HexagonProcessInstruction(), lowerConstant(), llvm::AMDGPUAsmPrinter::lowerOperand(), llvm::LoongArchAsmPrinter::LowerPATCHABLE_FUNCTION_ENTER(), needsSEHMoves(), llvm::AMDGPUAsmPrinter::PrintAsmOperand(), llvm::HexagonAsmPrinter::PrintAsmOperand(), llvm::SystemZAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::AVRAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::printOperand(), llvm::MipsAsmPrinter::printSavedRegsBitmask(), PrintSpecial(), llvm::ARMAsmPrinter::runOnMachineFunction(), runOnMachineFunction(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), llvm::R600AsmPrinter::runOnMachineFunction(), llvm::CSKYAsmPrinter::runOnMachineFunction(), llvm::LoongArchAsmPrinter::runOnMachineFunction(), llvm::M68kAsmPrinter::runOnMachineFunction(), llvm::MipsAsmPrinter::runOnMachineFunction(), llvm::X86AsmPrinter::runOnMachineFunction(), SetupMachineFunction(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
MachineLoopInfo* llvm::AsmPrinter::MLI = nullptr |
This is a pointer to the current MachineLoopInfo.
Definition at line 113 of file AsmPrinter.h.
Referenced by emitBasicBlockStart(), and emitFunctionBody().
MachineModuleInfo* llvm::AsmPrinter::MMI = nullptr |
This is a pointer to the current MachineModuleInfo.
Definition at line 107 of file AsmPrinter.h.
Referenced by doFinalization(), llvm::AVRAsmPrinter::doFinalization(), doInitialization(), llvm::WebAssemblyAsmPrinter::emitConstantPool(), llvm::WebAssemblyAsmPrinter::emitDecls(), llvm::ARMAsmPrinter::emitEndOfAsmFile(), llvm::X86AsmPrinter::emitEndOfAsmFile(), emitFunctionBody(), llvm::LoongArchAsmPrinter::emitJumpTableInfo(), llvm::AVRAsmPrinter::emitStartOfAsmFile(), llvm::X86AsmPrinter::emitStartOfAsmFile(), emitTTypeReference(), llvm::DwarfCFIException::endModule(), llvm::WinCFGuard::endModule(), getCodeViewJumpTableInfo(), getDataLayout(), llvm::AArch64MCInstLower::GetGlobalValueSymbol(), and handleIndirectSymViaGOTPCRel().
|
protected |
Definition at line 197 of file AsmPrinter.h.
Referenced by addDebugHandler(), and doFinalization().
|
protected |
Definition at line 193 of file AsmPrinter.h.
Referenced by addAsmPrinterHandler(), doFinalization(), and ~AsmPrinter().
MachineOptimizationRemarkEmitter* llvm::AsmPrinter::ORE = nullptr |
Optimization remark emitter.
Definition at line 116 of file AsmPrinter.h.
Referenced by emitFunctionBody(), and SetupMachineFunction().
MCContext& llvm::AsmPrinter::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.
Definition at line 96 of file AsmPrinter.h.
Referenced by createTempSymbol(), doFinalization(), llvm::AMDGPUAsmPrinter::doFinalization(), llvm::AVRAsmPrinter::doFinalization(), doInitialization(), EmitCamlGlobal(), llvm::DwarfDebug::emitDebugLocEntry(), llvm::WebAssemblyAsmPrinter::emitDecls(), llvm::MipsAsmPrinter::emitEndOfAsmFile(), llvm::SystemZAsmPrinter::emitEndOfAsmFile(), llvm::WebAssemblyAsmPrinter::emitEndOfAsmFile(), llvm::X86AsmPrinter::emitEndOfAsmFile(), llvm::EHStreamer::emitExceptionTable(), emitFrameAlloc(), llvm::WebAssemblyAsmPrinter::EmitFunctionAttributes(), emitFunctionBody(), llvm::AMDGPUAsmPrinter::emitFunctionBodyStart(), llvm::WebAssemblyAsmPrinter::emitFunctionBodyStart(), llvm::ARMAsmPrinter::emitFunctionEntryLabel(), llvm::SystemZAsmPrinter::emitFunctionEntryLabel(), emitGlobalAlias(), emitGlobalVariable(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::AMDGPUAsmPrinter::emitInstruction(), llvm::R600AsmPrinter::emitInstruction(), llvm::ARMAsmPrinter::emitInstruction(), llvm::AVRAsmPrinter::emitInstruction(), llvm::MipsAsmPrinter::emitInstruction(), llvm::SystemZAsmPrinter::emitInstruction(), llvm::WebAssemblyAsmPrinter::emitInstruction(), llvm::X86AsmPrinter::emitInstruction(), llvm::ARMAsmPrinter::emitJumpTableAddrs(), emitJumpTableInfo(), llvm::LoongArchAsmPrinter::emitJumpTableInfo(), llvm::ARMAsmPrinter::emitJumpTableInsts(), llvm::ARMAsmPrinter::emitJumpTableTBInst(), emitKCFITrapEntry(), llvm::X86AsmPrinter::emitKCFITypeId(), emitLabelPlusOffset(), llvm::XtensaAsmPrinter::emitMachineConstantPoolEntry(), llvm::ARMAsmPrinter::emitMachineConstantPoolValue(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), llvm::SystemZAsmPrinter::emitMachineConstantPoolValue(), llvm::XtensaAsmPrinter::emitMachineConstantPoolValue(), emitPatchableFunctionEntries(), llvm::WebAssemblyAsmPrinter::EmitProducerInfo(), emitRemarksSection(), llvm::HexagonAsmPrinter::EmitSled(), llvm::LoongArchAsmPrinter::emitSled(), emitSpecialLLVMGlobal(), llvm::MipsAsmPrinter::emitStartOfAsmFile(), llvm::WebAssemblyAsmPrinter::EmitTargetFeatures(), emitXRayTable(), llvm::ARMAsmPrinter::emitXXStructor(), llvm::AVRAsmPrinter::emitXXStructor(), llvm::WasmException::endModule(), llvm::WinCFGuard::endModule(), llvm::WinException::endModule(), getAddrLabelSymbolToEmit(), GetCPISymbol(), llvm::ARMAsmPrinter::GetCPISymbol(), GetExternalSymbolSymbol(), llvm::NVPTXAsmPrinter::getFunctionFrameSymbol(), GetJTISymbol(), GetJTSetSymbol(), llvm::WebAssemblyAsmPrinter::getOrCreateWasmSymbol(), GetSymbolFromOperand(), llvm::HexagonLowerToMC(), llvm::HexagonAsmPrinter::HexagonProcessInstruction(), lowerBlockAddressConstant(), lowerConstant(), llvm::AMDGPUAsmPrinter::lowerConstant(), llvm::R600AsmPrinter::lowerConstant(), llvm::AVRAsmPrinter::lowerConstant(), llvm::ARMAsmPrinter::lowerOperand(), llvm::AMDGPUAsmPrinter::lowerOperand(), llvm::LowerPPCMachineOperandToMCOperand(), LowerSymbolOperand(), llvm::XtensaAsmPrinter::LowerSymbolOperand(), llvm::CSKYMCInstLower::lowerSymbolOperand(), lowerSymbolOperand(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), and smallData().
std::unique_ptr<MCStreamer> llvm::AsmPrinter::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).
Definition at line 101 of file AsmPrinter.h.
Referenced by llvm::AMDGPUAsmPrinter::AMDGPUAsmPrinter(), AsmPrinter(), llvm::DwarfCFIException::beginBasicBlockSection(), llvm::DwarfDebug::beginCodeAlignment(), llvm::WinException::beginFunclet(), llvm::ARMException::beginFunction(), llvm::DwarfDebug::beginFunctionImpl(), llvm::DebugHandlerBase::beginInstruction(), llvm::DwarfDebug::beginInstruction(), doFinalization(), llvm::AMDGPUAsmPrinter::doFinalization(), llvm::AVRAsmPrinter::doFinalization(), llvm::NVPTXAsmPrinter::doFinalization(), doInitialization(), llvm::DwarfDebug::DwarfDebug(), llvm::DIEAbbrevSet::Emit(), emitAlignment(), llvm::X86AsmPrinter::emitBasicBlockEnd(), emitBasicBlockLoopComments(), emitBasicBlockStart(), emitBBAddrMapSection(), emitCallSiteValue(), EmitCamlGlobal(), emitCFIInstruction(), llvm::DwarfUnit::emitCommonHeader(), emitConstantPool(), llvm::XtensaAsmPrinter::emitConstantPool(), emitDebugLabelComment(), llvm::DwarfDebug::emitDebugLocEntryLocation(), emitDebugValue(), llvm::MipsAsmPrinter::emitDebugValue(), emitDebugValueComment(), emitDwarfDIE(), emitDwarfLengthOrOffset(), emitDwarfStringOffset(), emitDwarfSymbolReference(), emitDwarfUnitLength(), emitEncodingByte(), llvm::ARMAsmPrinter::emitEndOfAsmFile(), llvm::CSKYAsmPrinter::emitEndOfAsmFile(), llvm::HexagonAsmPrinter::emitEndOfAsmFile(), llvm::MipsAsmPrinter::emitEndOfAsmFile(), llvm::WebAssemblyAsmPrinter::emitEndOfAsmFile(), llvm::X86AsmPrinter::emitEndOfAsmFile(), llvm::EHStreamer::emitExceptionTable(), emitFakeUse(), emitFrameAlloc(), llvm::WebAssemblyAsmPrinter::EmitFunctionAttributes(), emitFunctionBody(), llvm::ARMAsmPrinter::emitFunctionBodyEnd(), llvm::MipsAsmPrinter::emitFunctionBodyEnd(), llvm::SystemZAsmPrinter::emitFunctionBodyEnd(), llvm::X86AsmPrinter::emitFunctionBodyEnd(), llvm::X86AsmPrinter::emitFunctionBodyStart(), emitFunctionEntryLabel(), llvm::ARMAsmPrinter::emitFunctionEntryLabel(), llvm::MipsAsmPrinter::emitFunctionEntryLabel(), llvm::SystemZAsmPrinter::emitFunctionEntryLabel(), emitGlobalAlias(), emitGlobalAliasInline(), emitGlobalConstant(), emitGlobalConstantArray(), emitGlobalConstantDataSequential(), emitGlobalConstantFP(), emitGlobalConstantImpl(), emitGlobalConstantLargeInt(), emitGlobalConstantStruct(), emitGlobalConstantVector(), emitGlobalVariable(), llvm::WebAssemblyAsmPrinter::emitGlobalVariable(), llvm::DwarfCompileUnit::emitHeader(), llvm::DwarfTypeUnit::emitHeader(), emitImplicitDef(), llvm::AMDGPUAsmPrinter::emitImplicitDef(), emitInitialRawDwarfLocDirective(), llvm::ARMAsmPrinter::emitInlineAsmEnd(), llvm::AMDGPUAsmPrinter::emitInstruction(), llvm::R600AsmPrinter::emitInstruction(), llvm::ARMAsmPrinter::emitInstruction(), llvm::AVRAsmPrinter::emitInstruction(), llvm::CSKYAsmPrinter::emitInstruction(), llvm::HexagonAsmPrinter::emitInstruction(), llvm::LoongArchAsmPrinter::emitInstruction(), llvm::M68kAsmPrinter::emitInstruction(), llvm::MipsAsmPrinter::emitInstruction(), llvm::SystemZAsmPrinter::emitInstruction(), llvm::WebAssemblyAsmPrinter::emitInstruction(), llvm::X86AsmPrinter::emitInstruction(), llvm::XtensaAsmPrinter::emitInstruction(), emitInt16(), emitInt32(), emitInt64(), emitInt8(), llvm::APByteStreamer::emitInt8(), llvm::ARMAsmPrinter::emitJumpTableAddrs(), emitJumpTableInfo(), llvm::LoongArchAsmPrinter::emitJumpTableInfo(), llvm::ARMAsmPrinter::emitJumpTableInsts(), llvm::ARMAsmPrinter::emitJumpTableTBInst(), emitKCFITrapEntry(), llvm::X86AsmPrinter::emitKCFITypeId(), emitKill(), emitLabelDifference(), emitLabelDifferenceAsULEB128(), emitLabelPlusOffset(), emitLinkage(), llvm::XtensaAsmPrinter::emitMachineConstantPoolEntry(), llvm::ARMAsmPrinter::emitMachineConstantPoolValue(), llvm::CSKYAsmPrinter::emitMachineConstantPoolValue(), llvm::SystemZAsmPrinter::emitMachineConstantPoolValue(), llvm::XtensaAsmPrinter::emitMachineConstantPoolValue(), emitNops(), emitPatchableFunctionEntries(), emitPCSections(), emitPCSectionsLabel(), llvm::WebAssemblyAsmPrinter::EmitProducerInfo(), llvm::PseudoProbeHandler::emitPseudoProbe(), emitRemarksSection(), emitSLEB128(), llvm::APByteStreamer::emitSLEB128(), llvm::HexagonAsmPrinter::EmitSled(), llvm::LoongArchAsmPrinter::emitSled(), emitSpecialLLVMGlobal(), emitStackSizeSection(), llvm::ARMAsmPrinter::emitStartOfAsmFile(), llvm::AVRAsmPrinter::emitStartOfAsmFile(), llvm::M68kAsmPrinter::emitStartOfAsmFile(), llvm::MipsAsmPrinter::emitStartOfAsmFile(), llvm::X86AsmPrinter::emitStartOfAsmFile(), llvm::WebAssemblyAsmPrinter::EmitTargetFeatures(), llvm::CSKYAsmPrinter::EmitToStreamer(), emitTTypeReference(), llvm::EHStreamer::emitTypeInfos(), llvm::APByteStreamer::emitULEB128(), emitULEB128(), llvm::DwarfFile::emitUnit(), llvm::DIEInlineString::emitValue(), llvm::DIEEntry::emitValue(), emitVisibility(), emitXRayTable(), llvm::ARMAsmPrinter::emitXXStructor(), llvm::AVRAsmPrinter::emitXXStructor(), emitXXStructorList(), llvm::DwarfCFIException::endBasicBlockSection(), llvm::WinException::endFunclet(), llvm::WinException::endFunction(), llvm::WasmException::endFunction(), llvm::DwarfDebug::endFunctionImpl(), llvm::DebugHandlerBase::endInstruction(), llvm::DwarfCFIException::endModule(), llvm::WasmException::endModule(), llvm::WinCFGuard::endModule(), llvm::WinException::endModule(), GetCPISymbol(), getCurrentSection(), llvm::DwarfDebug::getDwarfCompileUnitIDForLineTable(), getDwarfFormParams(), getDwarfOffsetByteSize(), getDwarfVersion(), llvm::DwarfDebug::getDwarfVersion(), llvm::AArch64MCInstLower::GetGlobalValueSymbol(), llvm::DwarfCompileUnit::getOrCreateSourceID(), llvm::WebAssemblyAsmPrinter::getTargetStreamer(), llvm::AMDGPUAsmPrinter::getTargetStreamer(), getUnitLengthFieldByteSize(), handleIndirectSymViaGOTPCRel(), llvm::HexagonAsmPrinter::HexagonProcessInstruction(), llvm::DwarfCompileUnit::initStmtList(), isDwarf64(), llvm::LoongArchAsmPrinter::LowerSTATEPOINT(), llvm::ARMException::markFunctionEnd(), llvm::WinException::markFunctionEnd(), llvm::FaultMaps::recordFaultingOp(), llvm::ARMAsmPrinter::runOnMachineFunction(), llvm::NVPTXAsmPrinter::runOnMachineFunction(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), llvm::R600AsmPrinter::runOnMachineFunction(), llvm::CSKYAsmPrinter::runOnMachineFunction(), llvm::X86AsmPrinter::runOnMachineFunction(), llvm::FaultMaps::serializeToFaultMapSection(), llvm::StackMaps::serializeToStackMapSection(), setDwarfVersion(), and llvm::DwarfDebug::terminateLineTable().
SmallVector<XRayFunctionEntry, 4> llvm::AsmPrinter::Sleds |
Definition at line 360 of file AsmPrinter.h.
Referenced by emitXRayTable(), and recordSled().
|
protected |
Definition at line 199 of file AsmPrinter.h.
Referenced by emitStackMaps(), and llvm::LoongArchAsmPrinter::LowerSTATEPOINT().
TargetMachine& llvm::AsmPrinter::TM |
Target machine description.
Definition at line 89 of file AsmPrinter.h.
Referenced by llvm::DwarfUnit::addAttribute(), llvm::DwarfDebug::addDwarfTypeUnitType(), llvm::DwarfCompileUnit::addLocationAttribute(), llvm::DwarfCFIException::beginBasicBlockSection(), llvm::WinException::beginFunclet(), llvm::CodeViewDebug::beginFunctionImpl(), llvm::DwarfUnit::constructTypeDIE(), doFinalization(), llvm::AVRAsmPrinter::doFinalization(), doInitialization(), llvm::AMDGPUAsmPrinter::doInitialization(), llvm::NVPTXAsmPrinter::doInitialization(), llvm::DwarfDebug::DwarfDebug(), emitAlignment(), emitBasicBlockStart(), llvm::XtensaAsmPrinter::emitConstantPool(), llvm::DwarfDebug::emitDebugLocValue(), llvm::WebAssemblyAsmPrinter::emitDecls(), llvm::AMDGPUAsmPrinter::emitEndOfAsmFile(), llvm::ARMAsmPrinter::emitEndOfAsmFile(), llvm::CSKYAsmPrinter::emitEndOfAsmFile(), llvm::HexagonAsmPrinter::emitEndOfAsmFile(), llvm::X86AsmPrinter::emitEndOfAsmFile(), llvm::EHStreamer::emitExceptionTable(), emitFunctionBody(), llvm::AMDGPUAsmPrinter::emitFunctionBodyEnd(), llvm::SystemZAsmPrinter::emitFunctionBodyEnd(), llvm::WebAssemblyAsmPrinter::emitFunctionBodyStart(), emitFunctionEntryLabel(), llvm::AMDGPUAsmPrinter::emitFunctionEntryLabel(), emitGlobalAlias(), emitGlobalConstantImpl(), emitGlobalVariable(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), llvm::AMDGPUAsmPrinter::emitInstruction(), llvm::MipsAsmPrinter::emitInstruction(), llvm::X86AsmPrinter::emitInstruction(), emitJumpTableInfo(), llvm::LoongArchAsmPrinter::emitJumpTableInfo(), emitPatchableFunctionEntries(), emitStackSizeSection(), llvm::ARMAsmPrinter::emitStartOfAsmFile(), llvm::AVRAsmPrinter::emitStartOfAsmFile(), llvm::CSKYAsmPrinter::emitStartOfAsmFile(), llvm::HexagonAsmPrinter::emitStartOfAsmFile(), llvm::MipsAsmPrinter::emitStartOfAsmFile(), llvm::SystemZAsmPrinter::emitStartOfAsmFile(), llvm::X86AsmPrinter::emitStartOfAsmFile(), emitTTypeReference(), emitXRayTable(), emitXXStructorList(), llvm::AIXException::endFunction(), llvm::MipsAsmPrinter::getCurrentABIString(), getFunctionCFISectionType(), llvm::AMDGPUAsmPrinter::getGlobalSTI(), llvm::AArch64MCInstLower::GetGlobalValueSymbol(), getNameWithPrefix(), getObjFileLowering(), getPointerSize(), getSymbol(), getSymbolPreferLocal(), getSymbolWithGlobalValueBase(), isPositionIndependent(), lowerConstant(), llvm::AMDGPUAsmPrinter::lowerConstant(), llvm::R600AsmPrinter::lowerConstant(), llvm::AArch64MCInstLower::LowerSymbolOperand(), llvm::AArch64MCInstLower::lowerSymbolOperandELF(), preprocessXXStructorList(), llvm::SystemZAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::PrintAsmOperand(), llvm::ARMAsmPrinter::runOnMachineFunction(), llvm::CSKYAsmPrinter::runOnMachineFunction(), llvm::X86AsmPrinter::runOnMachineFunction(), SetupMachineFunction(), and llvm::WinException::WinException().