LLVM 20.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::AMDGPUAsmPrinter Class Referencefinal

#include "Target/AMDGPU/AMDGPUAsmPrinter.h"

Inheritance diagram for llvm::AMDGPUAsmPrinter:
Inheritance graph
[legend]

Public Member Functions

 AMDGPUAsmPrinter (TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer)
 
StringRef getPassName () const override
 getPassName - Return a nice clean name for a pass.
 
const MCSubtargetInfogetGlobalSTI () const
 
AMDGPUTargetStreamergetTargetStreamer () const
 
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.
 
bool lowerOperand (const MachineOperand &MO, MCOperand &MCOp) const
 Wrapper for MCInstLowering.lowerOperand() for the tblgen'erated pseudo lowering.
 
const MCExprlowerConstant (const Constant *CV) override
 Lower the specified LLVM Constant to an MCExpr.
 
bool lowerPseudoInstExpansion (const MachineInstr *MI, MCInst &Inst)
 tblgen'erated driver function for lowering simple MI->MC pseudo instructions.
 
void emitInstruction (const MachineInstr *MI) override
 Implemented in AMDGPUMCInstLower.cpp.
 
void emitFunctionBodyStart () override
 Targets can override this to emit stuff before the first basic block in the function.
 
void emitFunctionBodyEnd () override
 Targets can override this to emit stuff after the last basic block in the function.
 
void emitImplicitDef (const MachineInstr *MI) const override
 Targets can override this to customize the output of IMPLICIT_DEF instructions in verbose mode.
 
void emitFunctionEntryLabel () override
 EmitFunctionEntryLabel - Emit the label that is the entrypoint for the function.
 
void emitBasicBlockStart (const MachineBasicBlock &MBB) override
 Targets can override this to emit stuff at the start of a basic block.
 
void emitGlobalVariable (const GlobalVariable *GV) override
 Emit the specified global variable to the .s file.
 
void emitStartOfAsmFile (Module &M) override
 This virtual method can be overridden by targets that want to emit something at the start of their file.
 
void emitEndOfAsmFile (Module &M) override
 This virtual method can be overridden by targets that want to emit something at the end of their file.
 
bool PrintAsmOperand (const MachineInstr *MI, unsigned OpNo, const char *ExtraCode, raw_ostream &O) override
 Print the specified operand of MI, an INLINEASM instruction, using the specified assembler variant.
 
- Public Member Functions inherited from llvm::AsmPrinter
 ~AsmPrinter () override
 
DwarfDebuggetDwarfDebug ()
 
DwarfDebuggetDwarfDebug () 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 MCSymbolgetFunctionFrameSymbol () const
 Return symbol for the function pseudo stack if the stack frame is not a register based.
 
MCSymbolgetFunctionBegin () const
 
MCSymbolgetFunctionEnd () const
 
MCSymbolgetMBBExceptionSym (const MachineBasicBlock &MBB)
 
MCSymbolgetAddrLabelSymbol (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 TargetLoweringObjectFilegetObjFileLowering () const
 Return information about object file lowering.
 
const DataLayoutgetDataLayout () const
 Return information about data layout.
 
unsigned getPointerSize () const
 Return the pointer size from the TargetMachine.
 
const MCSubtargetInfogetSubtargetInfo () const
 Return information about subtarget.
 
void EmitToStreamer (MCStreamer &S, const MCInst &Inst)
 
void emitInitialRawDwarfLocDirective (const MachineFunction &MF)
 Emits inital debug location directive.
 
const MCSectiongetCurrentSection () const
 Return the current section we are emitting to.
 
void getNameWithPrefix (SmallVectorImpl< char > &Name, const GlobalValue *GV) const
 
MCSymbolgetSymbol (const GlobalValue *GV) const
 
MCSymbolgetSymbolPreferLocal (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 MCExprlowerConstant (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 MCSymbolGetCPISymbol (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 MCExprlowerConstantPtrAuth (const ConstantPtrAuth &CPA)
 
virtual const MCExprlowerBlockAddressConstant (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 MCSubtargetInfogetIFuncMCSubtargetInfo () 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.
 
MCSymbolcreateTempSymbol (const Twine &Name) const
 
MCSymbolgetSymbolWithGlobalValueBase (const GlobalValue *GV, StringRef Suffix) const
 Return the MCSymbol for a private symbol with global value name as its base, with the specified suffix.
 
MCSymbolGetExternalSymbolSymbol (Twine Sym) const
 Return the MCSymbol for the specified ExternalSymbol.
 
MCSymbolGetJTISymbol (unsigned JTID, bool isLinkerPrivate=false) const
 Return the symbol for the specified jump table entry.
 
MCSymbolGetJTSetSymbol (unsigned UID, unsigned MBBID) const
 Return the symbol for the specified jump table .set FIXME: privatize to AsmPrinter.
 
MCSymbolGetBlockAddressSymbol (const BlockAddress *BA) const
 Return the MCSymbol used to satisfy BlockAddress uses of the specified basic block.
 
MCSymbolGetBlockAddressSymbol (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.
 
MCSymbolemitDwarfUnitLength (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::JumpTableEntrySizegetCodeViewJumpTableInfo (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.
 
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)
 
PasscreatePrinterPass (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
 
Passoperator= (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 PasscreatePrinterPass (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)
 
AnalysisResolvergetResolver () 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 ImmutablePassgetAsImmutablePass ()
 
virtual PMDataManagergetAsPMDataManager ()
 
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)
 

Protected Member Functions

void getAnalysisUsage (AnalysisUsage &AU) const override
 Record analysis usage.
 
- Protected Member Functions inherited from llvm::AsmPrinter
 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

std::vector< std::string > DisasmLines
 
std::vector< std::string > HexLines
 
size_t DisasmLineMaxLen
 
bool IsTargetStreamerInitialized
 
- Protected Attributes inherited from llvm::AsmPrinter
MCSymbolCurrentFnBegin = nullptr
 
MCSymbolCurrentFnBeginLocal = 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
 

Additional Inherited Members

- Public Types inherited from llvm::AsmPrinter
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.
 
- Static Public Member Functions inherited from llvm::AsmPrinter
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 PassInfolookupPassInfo (const void *TI)
 
static const PassInfolookupPassInfo (StringRef Arg)
 
static PasscreatePass (AnalysisID ID)
 
- Public Attributes inherited from llvm::AsmPrinter
TargetMachineTM
 Target machine description.
 
const MCAsmInfoMAI = nullptr
 Target Asm Printer information.
 
MCContextOutContext
 This is the context for the output file that we are streaming.
 
std::unique_ptr< MCStreamerOutStreamer
 This is the MCStreamer object for the file we are generating.
 
MachineFunctionMF = nullptr
 The current machine function.
 
MachineModuleInfoMMI = nullptr
 This is a pointer to the current MachineModuleInfo.
 
MachineDominatorTreeMDT = nullptr
 This is a pointer to the current MachineDominatorTree.
 
MachineLoopInfoMLI = nullptr
 This is a pointer to the current MachineLoopInfo.
 
MachineOptimizationRemarkEmitterORE = nullptr
 Optimization remark emitter.
 
MCSymbolCurrentPatchableFunctionEntrySym = nullptr
 The symbol for the entry in __patchable_function_entires.
 
MCSymbolCurrentFnSym = nullptr
 The symbol for the current function.
 
MCSymbolCurrentFnDescSym = nullptr
 The symbol for the current function descriptor on AIX.
 
MCSymbolCurrentFnSymForSize = nullptr
 The symbol used to represent the start of the current function for the purpose of calculating its size (e.g.
 
MapVector< MBBSectionID, MBBSectionRangeMBBSectionRanges
 
MapVector< const MCSymbol *, GOTEquivUsePairGlobalGOTEquivs
 
SmallVector< XRayFunctionEntry, 4 > Sleds
 

Detailed Description

Definition at line 38 of file AMDGPUAsmPrinter.h.

Constructor & Destructor Documentation

◆ AMDGPUAsmPrinter()

AMDGPUAsmPrinter::AMDGPUAsmPrinter ( TargetMachine TM,
std::unique_ptr< MCStreamer Streamer 
)
explicit

Definition at line 93 of file AMDGPUAsmPrinter.cpp.

References assert(), and llvm::AsmPrinter::OutStreamer.

Member Function Documentation

◆ doFinalization()

bool AMDGPUAsmPrinter::doFinalization ( Module M)
overridevirtual

◆ doInitialization()

bool AMDGPUAsmPrinter::doInitialization ( Module M)
overridevirtual

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::AsmPrinter.

Definition at line 343 of file AMDGPUAsmPrinter.cpp.

References llvm::Triple::AMDHSA, llvm::AMDGPU::AMDHSA_COV4, llvm::AMDGPU::AMDHSA_COV5, llvm::AMDGPU::AMDHSA_COV6, llvm::AsmPrinter::doInitialization(), llvm::AMDGPU::getAMDHSACodeObjectVersion(), llvm::Triple::getOS(), llvm::TargetMachine::getTargetTriple(), llvm::report_fatal_error(), and llvm::AsmPrinter::TM.

◆ emitBasicBlockStart()

void AMDGPUAsmPrinter::emitBasicBlockStart ( const MachineBasicBlock MBB)
overridevirtual

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 from llvm::AsmPrinter.

Definition at line 296 of file AMDGPUAsmPrinter.cpp.

References DisasmLineMaxLen, DisasmLines, llvm::AsmPrinter::emitBasicBlockStart(), llvm::AsmPrinter::getFunctionNumber(), llvm::MachineBasicBlock::getNumber(), HexLines, llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), and MBB.

◆ emitEndOfAsmFile()

void AMDGPUAsmPrinter::emitEndOfAsmFile ( Module )
overridevirtual

This virtual method can be overridden by targets that want to emit something at the end of their file.

Reimplemented from llvm::AsmPrinter.

Definition at line 141 of file AMDGPUAsmPrinter.cpp.

References llvm::Triple::AMDHSA, assert(), llvm::AMDGPUTargetStreamer::EmitISAVersion(), llvm::Triple::getOS(), getTargetStreamer(), llvm::TargetMachine::getTargetTriple(), IsTargetStreamerInitialized, Success, and llvm::AsmPrinter::TM.

◆ emitFunctionBodyEnd()

void AMDGPUAsmPrinter::emitFunctionBodyEnd ( )
overridevirtual

◆ emitFunctionBodyStart()

void AMDGPUAsmPrinter::emitFunctionBodyStart ( )
overridevirtual

◆ emitFunctionEntryLabel()

void AMDGPUAsmPrinter::emitFunctionEntryLabel ( )
overridevirtual

◆ emitGlobalVariable()

void AMDGPUAsmPrinter::emitGlobalVariable ( const GlobalVariable GV)
overridevirtual

◆ emitImplicitDef()

void AMDGPUAsmPrinter::emitImplicitDef ( const MachineInstr MI) const
overridevirtual

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 from llvm::AsmPrinter.

Definition at line 257 of file AMDGPUAsmPrinter.cpp.

References llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::AsmPrinter::MF, MI, OS, llvm::AsmPrinter::OutStreamer, llvm::printReg(), and llvm::AMDGPU::SGPR_SPILL.

◆ emitInstruction()

void AMDGPUAsmPrinter::emitInstruction ( const MachineInstr MI)
overridevirtual

◆ emitStartOfAsmFile()

void AMDGPUAsmPrinter::emitStartOfAsmFile ( Module )
overridevirtual

This virtual method can be overridden by targets that want to emit something at the start of their file.

Reimplemented from llvm::AsmPrinter.

Definition at line 113 of file AMDGPUAsmPrinter.cpp.

References IsTargetStreamerInitialized.

◆ getAnalysisUsage()

void AMDGPUAsmPrinter::getAnalysisUsage ( AnalysisUsage AU) const
overrideprotectedvirtual

◆ getGlobalSTI()

const MCSubtargetInfo * AMDGPUAsmPrinter::getGlobalSTI ( ) const

◆ getPassName()

StringRef AMDGPUAsmPrinter::getPassName ( ) const
overridevirtual

getPassName - Return a nice clean name for a pass.

This usually implemented in terms of the name that is registered by one of the Registration templates, but can be overloaded directly.

Reimplemented from llvm::Pass.

Definition at line 99 of file AMDGPUAsmPrinter.cpp.

◆ getTargetStreamer()

AMDGPUTargetStreamer * AMDGPUAsmPrinter::getTargetStreamer ( ) const

◆ lowerConstant()

const MCExpr * AMDGPUAsmPrinter::lowerConstant ( const Constant CV)
overridevirtual

Lower the specified LLVM Constant to an MCExpr.

The AsmPrinter::lowerConstantof does not know how to lower addrspacecast, therefore they should be lowered by this function.

Reimplemented from llvm::AsmPrinter.

Definition at line 168 of file AMDGPUMCInstLower.cpp.

References llvm::Address, llvm::Value::getContext(), llvm::Type::getInt32Ty(), llvm::AMDGPUMachineFunction::getLDSAbsoluteAddress(), lowerAddrSpaceCast(), llvm::AsmPrinter::lowerConstant(), llvm::AsmPrinter::OutContext, and llvm::AsmPrinter::TM.

◆ lowerOperand()

bool AMDGPUAsmPrinter::lowerOperand ( const MachineOperand MO,
MCOperand MCOp 
) const

Wrapper for MCInstLowering.lowerOperand() for the tblgen'erated pseudo lowering.

Definition at line 161 of file AMDGPUMCInstLower.cpp.

References llvm::MachineFunction::getSubtarget(), llvm::AsmPrinter::MF, and llvm::AsmPrinter::OutContext.

◆ lowerPseudoInstExpansion()

bool llvm::AMDGPUAsmPrinter::lowerPseudoInstExpansion ( const MachineInstr MI,
MCInst Inst 
)

tblgen'erated driver function for lowering simple MI->MC pseudo instructions.

Referenced by emitInstruction().

◆ PrintAsmOperand()

bool AMDGPUAsmPrinter::PrintAsmOperand ( const MachineInstr MI,
unsigned  OpNo,
const char ExtraCode,
raw_ostream O 
)
overridevirtual

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 from llvm::AsmPrinter.

Definition at line 1613 of file AMDGPUAsmPrinter.cpp.

References llvm::format(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getReg(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::MachineOperand::isImm(), llvm::AMDGPU::isInlinableIntLiteral(), llvm::MachineOperand::isReg(), llvm::AsmPrinter::MF, MI, llvm::AsmPrinter::PrintAsmOperand(), and llvm::AMDGPUInstPrinter::printRegOperand().

◆ runOnMachineFunction()

bool AMDGPUAsmPrinter::runOnMachineFunction ( MachineFunction MF)
overridevirtual

Emit the specified function out to the OutStreamer.

Reimplemented from llvm::AsmPrinter.

Definition at line 644 of file AMDGPUAsmPrinter.cpp.

References llvm::SIProgramInfo::AccumOffset, assert(), llvm::AMDGPU::MCKernelDescriptor::bits_get(), llvm::SIProgramInfo::ComputePGMRSrc3GFX90A, llvm::MCConstantExpr::create(), llvm::MCBinaryExpr::createAdd(), llvm::MCBinaryExpr::createMul(), llvm::MCResourceInfo::createTotalNumSGPRs(), llvm::MCResourceInfo::createTotalNumVGPRs(), llvm::AsmPrinter::CurrentFnSym, DisasmLineMaxLen, DisasmLines, llvm::GCNSubtarget::dumpCode(), llvm::AsmPrinter::emitFunctionBody(), llvm::AMDGPUTargetStreamer::EmitMCResourceInfo(), llvm::SIProgramInfo::FloatMode, llvm::MCResourceInfo::gatherResourceInfo(), llvm::MachineFunction::getContext(), llvm::MCObjectFileInfo::getContext(), llvm::MCAssembler::getEmitterPtr(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::MCSymbol::getName(), llvm::AsmPrinter::getObjFileLowering(), llvm::GlobalValue::getParent(), llvm::AMDGPUResourceUsageAnalysis::getResourceInfo(), llvm::MachineFunction::getSubtarget(), llvm::MCResourceInfo::getSymbol(), llvm::GCNSubtarget::getTargetID(), getTargetStreamer(), llvm::MCSymbol::getVariableValue(), llvm::GCNSubtarget::hasGFX90AInsts(), llvm::GCNSubtarget::hasMAIInsts(), HexLines, llvm::SIProgramInfo::IEEEMode, Info, llvm::AMDGPUSubtarget::isAmdHsaOS(), llvm::AMDGPUSubtarget::isAmdPalOS(), llvm::AMDGPUMachineFunction::isEntryFunction(), llvm::AMDGPUMachineFunction::isModuleEntryFunction(), IsTargetStreamerInitialized, llvm::AsmPrinter::isVerbose(), llvm::AMDGPU::IsaInfo::AMDGPUTargetID::isXnackOnOrAny(), llvm::SIProgramInfo::LDSSize, llvm::AsmPrinter::MF, llvm::AMDGPUMachineFunction::needsWaveLimiter(), llvm::SIProgramInfo::NumAccVGPR, llvm::SIProgramInfo::NumArchVGPR, llvm::SIProgramInfo::NumSGPR, llvm::SIProgramInfo::NumSGPRsForWavesPerEU, llvm::SIProgramInfo::NumVGPR, llvm::SIProgramInfo::NumVGPRsForWavesPerEU, llvm::SIProgramInfo::Occupancy, llvm::AsmPrinter::OutContext, llvm::AsmPrinter::OutStreamer, llvm::SIProgramInfo::reset(), llvm::SIProgramInfo::ScratchEnable, llvm::SIProgramInfo::ScratchSize, llvm::MachineFunction::setAlignment(), llvm::AsmPrinter::SetupMachineFunction(), llvm::SIProgramInfo::SGPRBlocks, llvm::ELF::SHT_PROGBITS, llvm::size(), llvm::SIProgramInfo::TGIdXEnable, llvm::SIProgramInfo::TGIdYEnable, llvm::SIProgramInfo::TGIdZEnable, llvm::SIProgramInfo::TIdIGCompCount, llvm::SIProgramInfo::TrapHandlerEnable, llvm::SIProgramInfo::UserSGPR, and llvm::SIProgramInfo::VGPRBlocks.

Member Data Documentation

◆ DisasmLineMaxLen

size_t llvm::AMDGPUAsmPrinter::DisasmLineMaxLen
protected

◆ DisasmLines

std::vector<std::string> llvm::AMDGPUAsmPrinter::DisasmLines
protected

◆ HexLines

std::vector<std::string> llvm::AMDGPUAsmPrinter::HexLines
protected

◆ IsTargetStreamerInitialized

bool llvm::AMDGPUAsmPrinter::IsTargetStreamerInitialized
protected

Definition at line 145 of file AMDGPUAsmPrinter.h.

Referenced by emitEndOfAsmFile(), emitStartOfAsmFile(), and runOnMachineFunction().


The documentation for this class was generated from the following files: