LLVM
15.0.0git
|
#include "Target/AMDGPU/AMDGPUAsmPrinter.h"
Public Member Functions | |
AMDGPUAsmPrinter (TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer) | |
StringRef | getPassName () const override |
getPassName - Return a nice clean name for a pass. More... | |
const MCSubtargetInfo * | getGlobalSTI () const |
AMDGPUTargetStreamer * | getTargetStreamer () const |
bool | doFinalization (Module &M) override |
Shut down the asmprinter. More... | |
bool | runOnMachineFunction (MachineFunction &MF) override |
Emit the specified function out to the OutStreamer. More... | |
bool | lowerOperand (const MachineOperand &MO, MCOperand &MCOp) const |
Wrapper for MCInstLowering.lowerOperand() for the tblgen'erated pseudo lowering. More... | |
const MCExpr * | lowerConstant (const Constant *CV) override |
Lower the specified LLVM Constant to an MCExpr. More... | |
bool | emitPseudoExpansionLowering (MCStreamer &OutStreamer, const MachineInstr *MI) |
tblgen'erated driver function for lowering simple MI->MC pseudo instructions. More... | |
void | emitInstruction (const MachineInstr *MI) override |
Implemented in AMDGPUMCInstLower.cpp. More... | |
void | emitFunctionBodyStart () override |
Targets can override this to emit stuff before the first basic block in the function. More... | |
void | emitFunctionBodyEnd () override |
Targets can override this to emit stuff after the last basic block in the function. More... | |
void | emitFunctionEntryLabel () override |
EmitFunctionEntryLabel - Emit the label that is the entrypoint for the function. More... | |
void | emitBasicBlockStart (const MachineBasicBlock &MBB) override |
Targets can override this to emit stuff at the start of a basic block. More... | |
void | emitGlobalVariable (const GlobalVariable *GV) override |
Emit the specified global variable to the .s file. More... | |
void | emitStartOfAsmFile (Module &M) override |
This virtual method can be overridden by targets that want to emit something at the start of their file. More... | |
void | emitEndOfAsmFile (Module &M) override |
This virtual method can be overridden by targets that want to emit something at the end of their file. More... | |
bool | isBlockOnlyReachableByFallthrough (const MachineBasicBlock *MBB) const override |
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. More... | |
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. More... | |
![]() | |
~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. More... | |
unsigned int | getUnitLengthFieldByteSize () const |
Returns 4 for DWARF32 and 12 for DWARF64. More... | |
dwarf::FormParams | getDwarfFormParams () const |
Returns information about the byte size of DW_FORM values. More... | |
bool | isPositionIndependent () const |
bool | isVerbose () const |
Return true if assembly output should contain comments. More... | |
unsigned | getFunctionNumber () const |
Return a unique ID for the current function. More... | |
virtual const MCSymbol * | getFunctionFrameSymbol () const |
Return symbol for the function pseudo stack if the stack frame is not a register based. More... | |
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. More... | |
ArrayRef< MCSymbol * > | getAddrLabelSymbolToEmit (const BasicBlock *BB) |
Return the symbol to be used for the specified basic block when its address is taken. More... | |
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. More... | |
const TargetLoweringObjectFile & | getObjFileLowering () const |
Return information about object file lowering. More... | |
const DataLayout & | getDataLayout () const |
Return information about data layout. More... | |
unsigned | getPointerSize () const |
Return the pointer size from the TargetMachine. More... | |
const MCSubtargetInfo & | getSubtargetInfo () const |
Return information about subtarget. More... | |
void | EmitToStreamer (MCStreamer &S, const MCInst &Inst) |
void | emitInitialRawDwarfLocDirective (const MachineFunction &MF) |
Emits inital debug location directive. More... | |
const MCSection * | getCurrentSection () const |
Return the current section we are emitting to. More... | |
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. More... | |
void | recordSled (MCSymbol *Sled, const MachineInstr &MI, SledKind Kind, uint8_t Version=0) |
void | emitXRayTable () |
Emit a table with all XRay instrumentation points. More... | |
void | emitPatchableFunctionEntries () |
bool | doInitialization (Module &M) override |
Set up the AsmPrinter when we are working on a new module. More... | |
virtual void | SetupMachineFunction (MachineFunction &MF) |
This should be called when a new MachineFunction is being processed from runOnMachineFunction. More... | |
void | emitFunctionBody () |
This method emits the body and trailer for a function. More... | |
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 | emitPseudoProbe (const MachineInstr &MI) |
void | emitRemarksSection (remarks::RemarkStreamer &RS) |
CFISection | getFunctionCFISectionType (const Function &F) const |
Get the CFISection type for a function. More... | |
CFISection | getFunctionCFISectionType (const MachineFunction &MF) const |
Get the CFISection type for a function. More... | |
CFISection | getModuleCFISectionType () const |
Get the CFISection type for the module. More... | |
bool | needsSEHMoves () |
bool | needsCFIForDebug () const |
Since emitting CFI unwind information is entangled with supporting the exceptions, this returns true for platforms which use CFI unwind information for debugging purpose when MCAsmInfo::ExceptionsType == ExceptionHandling::None . More... | |
virtual void | emitConstantPool () |
Print to the current output stream assembly representations of the constants in the constant pool MCP. More... | |
virtual void | emitJumpTableInfo () |
Print assembly representations of the jump tables used by the current function to the current output stream. More... | |
bool | emitSpecialLLVMGlobal (const GlobalVariable *GV) |
Check to see if the specified global is a special global used by LLVM. More... | |
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. More... | |
virtual void | emitXXStructorList (const DataLayout &DL, const Constant *List, bool IsCtor) |
This method emits llvm.global_ctors or llvm.global_dtors list. More... | |
void | emitAlignment (Align Alignment, const GlobalObject *GV=nullptr, unsigned MaxBytesToEmit=0) const |
Emit an alignment directive to the specified power of two boundary. More... | |
void | emitGlobalConstant (const DataLayout &DL, const Constant *CV) |
Print a general LLVM constant to the .s file. More... | |
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. More... | |
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. More... | |
void | emitStackMaps (StackMaps &SM) |
Emit the stack maps. More... | |
void | addAsmPrinterHandler (HandlerInfo Handler) |
virtual void | emitBasicBlockEnd (const MachineBasicBlock &MBB) |
Targets can override this to emit stuff at the end of a basic block. More... | |
virtual MCSymbol * | GetCPISymbol (unsigned CPID) const |
Return the symbol for the specified constant pool entry. More... | |
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. More... | |
virtual void | emitImplicitDef (const MachineInstr *MI) const |
Targets can override this to customize the output of IMPLICIT_DEF instructions in verbose mode. More... | |
void | emitNops (unsigned N) |
Emit N NOP instructions. More... | |
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. More... | |
MCSymbol * | GetExternalSymbolSymbol (StringRef Sym) const |
Return the MCSymbol for the specified ExternalSymbol. More... | |
MCSymbol * | GetJTISymbol (unsigned JTID, bool isLinkerPrivate=false) const |
Return the symbol for the specified jump table entry. More... | |
MCSymbol * | GetJTSetSymbol (unsigned UID, unsigned MBBID) const |
Return the symbol for the specified jump table .set FIXME: privatize to AsmPrinter. More... | |
MCSymbol * | GetBlockAddressSymbol (const BlockAddress *BA) const |
Return the MCSymbol used to satisfy BlockAddress uses of the specified basic block. More... | |
MCSymbol * | GetBlockAddressSymbol (const BasicBlock *BB) const |
void | printOffset (int64_t Offset, raw_ostream &OS) const |
This is just convenient handler for printing offsets. More... | |
void | emitInt8 (int Value) const |
Emit a byte directive and value. More... | |
void | emitInt16 (int Value) const |
Emit a short directive and value. More... | |
void | emitInt32 (int Value) const |
Emit a long directive and value. More... | |
void | emitInt64 (uint64_t Value) const |
Emit a long long directive and value. More... | |
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. More... | |
void | emitLabelDifferenceAsULEB128 (const MCSymbol *Hi, const MCSymbol *Lo) const |
Emit something like ".uleb128 Hi-Lo". More... | |
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. More... | |
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. More... | |
void | emitSLEB128 (int64_t Value, const char *Desc=nullptr) const |
Emit the specified signed leb128 value. More... | |
void | emitULEB128 (uint64_t Value, const char *Desc=nullptr, unsigned PadTo=0) const |
Emit the specified unsigned leb128 value. More... | |
void | emitEncodingByte (unsigned Val, const char *Desc=nullptr) const |
Emit a .byte 42 directive that corresponds to an encoding. More... | |
unsigned | GetSizeOfEncodedValue (unsigned Encoding) const |
Return the size of the encoding in bytes. More... | |
virtual void | emitTTypeReference (const GlobalValue *GV, unsigned Encoding) |
Emit reference to a ttype global with a specified encoding. More... | |
void | emitDwarfSymbolReference (const MCSymbol *Label, bool ForceOffset=false) const |
Emit a reference to a symbol for use in dwarf. More... | |
void | emitDwarfStringOffset (DwarfStringPoolEntry S) const |
Emit the 4- or 8-byte offset of a string from the start of its section. More... | |
void | emitDwarfStringOffset (DwarfStringPoolEntryRef S) const |
Emit the 4-or 8-byte offset of a string from the start of its section. More... | |
void | emitDwarfOffset (const MCSymbol *Label, uint64_t Offset) const |
Emit something like ".long Label + Offset" or ".quad Label + Offset" depending on the DWARF format. More... | |
void | emitDwarfLengthOrOffset (uint64_t Value) const |
Emit 32- or 64-bit value depending on the DWARF format. More... | |
void | emitDwarfUnitLength (uint64_t Length, const Twine &Comment) const |
Emit a unit length field. More... | |
MCSymbol * | emitDwarfUnitLength (const Twine &Prefix, const Twine &Comment) const |
Emit a unit length field. More... | |
void | emitCallSiteOffset (const MCSymbol *Hi, const MCSymbol *Lo, unsigned Encoding) const |
Emit reference to a call site with a specified encoding. More... | |
void | emitCallSiteValue (uint64_t Value, unsigned Encoding) const |
Emit an integer value corresponding to the call site encoding. More... | |
virtual unsigned | getISAEncoding () |
Get the value for DW_AT_APPLE_isa. Zero if no isa encoding specified. More... | |
virtual void | emitDebugValue (const MCExpr *Value, unsigned Size) const |
Emit the directive and value for debug thread local expression. More... | |
void | emitCFIInstruction (const MCCFIInstruction &Inst) const |
Emit frame instruction to describe the layout of the frame. More... | |
template<typename T > | |
void | emitDwarfAbbrevs (const T &Abbrevs) const |
Emit Dwarf abbreviation table. More... | |
void | emitDwarfAbbrev (const DIEAbbrev &Abbrev) const |
void | emitDwarfDIE (const DIE &Die) const |
Recursively emit Dwarf DIE tree. More... | |
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. More... | |
virtual void | PrintSymbolOperand (const MachineOperand &MO, raw_ostream &OS) |
Print the MachineOperand as a symbol. More... | |
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. More... | |
virtual void | emitInlineAsmStart () const |
Let the target do anything it needs to do before emitting inlineasm. More... | |
virtual void | emitInlineAsmEnd (const MCSubtargetInfo &StartInfo, const MCSubtargetInfo *EndInfo) const |
Let the target do anything it needs to do after emitting inlineasm. More... | |
void | emitVisibility (MCSymbol *Sym, unsigned Visibility, bool IsDefinition=true) const |
This emits visibility information about symbol, if this is supported by the target. More... | |
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. More... | |
![]() | |
bool | doInitialization (Module &) override |
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run. More... | |
![]() | |
FunctionPass (char &pid) | |
Pass * | createPrinterPass (raw_ostream &OS, const std::string &Banner) const override |
createPrinterPass - Get a function printer pass. More... | |
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. More... | |
PassManagerType | getPotentialPassManagerType () const override |
Return what kind of Pass Manager can manage this pass. More... | |
![]() | |
Pass (PassKind K, char &pid) | |
Pass (const Pass &)=delete | |
Pass & | operator= (const Pass &)=delete |
virtual | ~Pass () |
PassKind | getPassKind () const |
AnalysisID | getPassID () const |
getPassID - Return the PassID number that corresponds to this pass. More... | |
virtual void | print (raw_ostream &OS, const Module *M) const |
print - Print out the internal state of the pass. More... | |
void | dump () const |
virtual void | preparePassManager (PMStack &) |
Check if available pass managers are suitable for this pass or not. More... | |
void | setResolver (AnalysisResolver *AR) |
AnalysisResolver * | getResolver () const |
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. More... | |
virtual void * | getAdjustedAnalysisPointer (AnalysisID ID) |
getAdjustedAnalysisPointer - This method is used when a pass implements an analysis interface through multiple inheritance. More... | |
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. More... | |
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. More... | |
bool | mustPreserveAnalysisID (char &AID) const |
mustPreserveAnalysisID - This method serves the same function as getAnalysisIfAvailable, but works if you just have an AnalysisID. More... | |
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. More... | |
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. More... | |
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. More... | |
![]() | |
AsmPrinter (TargetMachine &TM, std::unique_ptr< MCStreamer > Streamer) | |
virtual bool | shouldEmitWeakSwiftAsyncExtendedFramePointerFlags () const |
![]() | |
MachineFunctionPass (char &ID) | |
virtual MachineFunctionProperties | getRequiredProperties () const |
virtual MachineFunctionProperties | getSetProperties () const |
virtual MachineFunctionProperties | getClearedProperties () const |
![]() | |
bool | skipFunction (const Function &F) const |
Optional passes call this function to check whether the pass should be skipped. More... | |
Protected Attributes | |
std::vector< std::string > | DisasmLines |
std::vector< std::string > | HexLines |
size_t | DisasmLineMaxLen |
bool | IsTargetStreamerInitialized |
![]() | |
MCSymbol * | CurrentFnBegin = nullptr |
std::vector< HandlerInfo > | Handlers |
A vector of all debug/EH info emitters we should use. More... | |
size_t | NumUserHandlers = 0 |
Additional Inherited Members | |
![]() | |
enum | CFISection : unsigned { CFISection::None = 0, CFISection::EH = 1, CFISection::Debug = 2 } |
enum | SledKind : uint8_t { SledKind::FUNCTION_ENTER = 0, SledKind::FUNCTION_EXIT = 1, SledKind::TAIL_CALL = 2, SledKind::LOG_ARGS_ENTER = 3, SledKind::CUSTOM_EVENT = 4, SledKind::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. More... | |
![]() | |
static Align | getGVAlignment (const GlobalObject *GV, const DataLayout &DL, Align InAlign=Align(1)) |
Return the alignment for the specified GV . More... | |
![]() | |
static const PassInfo * | lookupPassInfo (const void *TI) |
static const PassInfo * | lookupPassInfo (StringRef Arg) |
static Pass * | createPass (AnalysisID ID) |
![]() | |
TargetMachine & | TM |
Target machine description. More... | |
const MCAsmInfo * | MAI |
Target Asm Printer information. More... | |
MCContext & | OutContext |
This is the context for the output file that we are streaming. More... | |
std::unique_ptr< MCStreamer > | OutStreamer |
This is the MCStreamer object for the file we are generating. More... | |
MachineFunction * | MF = nullptr |
The current machine function. More... | |
MachineModuleInfo * | MMI = nullptr |
This is a pointer to the current MachineModuleInfo. More... | |
MachineDominatorTree * | MDT = nullptr |
This is a pointer to the current MachineDominatorTree. More... | |
MachineLoopInfo * | MLI = nullptr |
This is a pointer to the current MachineLoopInfo. More... | |
MachineOptimizationRemarkEmitter * | ORE |
Optimization remark emitter. More... | |
MCSymbol * | CurrentPatchableFunctionEntrySym = nullptr |
The symbol for the entry in __patchable_function_entires. More... | |
MCSymbol * | CurrentFnSym = nullptr |
The symbol for the current function. More... | |
MCSymbol * | CurrentFnDescSym = nullptr |
The symbol for the current function descriptor on AIX. More... | |
MCSymbol * | CurrentFnSymForSize = nullptr |
The symbol used to represent the start of the current function for the purpose of calculating its size (e.g. More... | |
MapVector< unsigned, MBBSectionRange > | MBBSectionRanges |
MapVector< const MCSymbol *, GOTEquivUsePair > | GlobalGOTEquivs |
SmallVector< XRayFunctionEntry, 4 > | Sleds |
Definition at line 40 of file AMDGPUAsmPrinter.h.
|
explicit |
Definition at line 86 of file AMDGPUAsmPrinter.cpp.
References llvm::Triple::AMDHSA, getGlobalSTI(), llvm::Triple::getOS(), llvm::TargetMachine::getTargetTriple(), llvm::AMDGPU::isHsaAbiVersion2(), llvm::AMDGPU::isHsaAbiVersion3(), llvm::AMDGPU::isHsaAbiVersion5(), and llvm::AsmPrinter::TM.
|
overridevirtual |
Shut down the asmprinter.
If you override this in your pass, you must make sure to call it explicitly.
Reimplemented from llvm::AsmPrinter.
Definition at line 347 of file AMDGPUAsmPrinter.cpp.
References llvm::Triple::AMDHSA, llvm::Triple::AMDPAL, llvm::AsmPrinter::doFinalization(), llvm::AMDGPUTargetStreamer::EmitCodeEnd(), getGlobalSTI(), llvm::AsmPrinter::getObjFileLowering(), llvm::Triple::getOS(), getTargetStreamer(), llvm::MCSubtargetInfo::getTargetTriple(), llvm::AMDGPU::isGFX10Plus(), llvm::AMDGPU::isGFX90A(), M, and llvm::AsmPrinter::OutStreamer.
|
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 300 of file AMDGPUAsmPrinter.cpp.
References DisasmLineMaxLen, DisasmLines, llvm::AsmPrinter::emitBasicBlockStart(), llvm::AsmPrinter::getFunctionNumber(), llvm::MachineBasicBlock::getNumber(), HexLines, isBlockOnlyReachableByFallthrough(), llvm::max(), and MBB.
|
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 154 of file AMDGPUAsmPrinter.cpp.
References llvm::Triple::AMDHSA, assert(), llvm::AMDGPUTargetStreamer::EmitISAVersion(), getGlobalSTI(), llvm::Triple::getOS(), getTargetStreamer(), llvm::TargetMachine::getTargetTriple(), llvm::AMDGPU::isHsaAbiVersion2(), IsTargetStreamerInitialized, M, Success, and llvm::AsmPrinter::TM.
|
overridevirtual |
Targets can override this to emit stuff after the last basic block in the function.
Reimplemented from llvm::AsmPrinter.
Definition at line 236 of file AMDGPUAsmPrinter.cpp.
References Align, llvm::Triple::AMDHSA, Context, llvm::AMDGPUTargetStreamer::EmitAmdhsaKernelDescriptor(), llvm::SIProgramInfo::FlatUsed, llvm::MachineFunction::getFunction(), getGlobalSTI(), llvm::MachineFunction::getInfo(), llvm::AsmPrinter::getNameWithPrefix(), llvm::AMDGPU::IsaInfo::getNumExtraSGPRs(), llvm::Triple::getOS(), llvm::MCTargetStreamer::getStreamer(), llvm::MachineFunction::getSubtarget(), getTargetStreamer(), llvm::TargetMachine::getTargetTriple(), llvm::AMDGPUMachineFunction::isEntryFunction(), llvm::AMDGPU::isHsaAbiVersion2(), llvm::AsmPrinter::MF, llvm::SIProgramInfo::NumSGPRsForWavesPerEU, llvm::SIProgramInfo::NumVGPRsForWavesPerEU, llvm::AsmPrinter::TM, and llvm::SIProgramInfo::VCCUsed.
|
overridevirtual |
Targets can override this to emit stuff before the first basic block in the function.
Reimplemented from llvm::AsmPrinter.
Definition at line 191 of file AMDGPUAsmPrinter.cpp.
References llvm::CallingConv::AMDGPU_KERNEL, llvm::SystemZICMP::Any, llvm::AMDGPUTargetStreamer::EmitAMDKernelCodeT(), F, llvm::MachineFunction::getFunction(), getGlobalSTI(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getName(), llvm::MachineFunction::getSubtarget(), llvm::AMDGPUTargetStreamer::getTargetID(), getTargetStreamer(), llvm::AMDGPUMachineFunction::isEntryFunction(), llvm::AMDGPU::isHsaAbiVersion2(), llvm::AsmPrinter::MF, llvm::AsmPrinter::OutContext, llvm::MCContext::reportError(), and llvm::CallingConv::SPIR_KERNEL.
|
overridevirtual |
EmitFunctionEntryLabel - Emit the label that is the entrypoint for the function.
This can be overridden by targets as required to do custom stuff.
Reimplemented from llvm::AsmPrinter.
Definition at line 275 of file AMDGPUAsmPrinter.cpp.
References llvm::Triple::AMDHSA, DisasmLineMaxLen, DisasmLines, llvm::AMDGPUTargetStreamer::EmitAMDGPUSymbolType(), llvm::AsmPrinter::emitFunctionEntryLabel(), llvm::MachineFunction::getFunction(), getGlobalSTI(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getName(), llvm::AsmPrinter::getNameWithPrefix(), llvm::Triple::getOS(), llvm::MachineFunction::getSubtarget(), getTargetStreamer(), llvm::TargetMachine::getTargetTriple(), HexLines, llvm::AMDGPUMachineFunction::isEntryFunction(), llvm::AMDGPU::isHsaAbiVersion3AndAbove(), llvm::max(), llvm::AsmPrinter::MF, llvm::StringRef::str(), llvm::ELF::STT_AMDGPU_HSA_KERNEL, llvm::AMDGPU::HSAMD::Kernel::Key::SymbolName, and llvm::AsmPrinter::TM.
|
overridevirtual |
Emit the specified global variable to the .s file.
EmitGlobalVariable - Emit the specified global variable to the .s file.
Reimplemented from llvm::AsmPrinter.
Definition at line 312 of file AMDGPUAsmPrinter.cpp.
References Align, llvm::Triple::AMDHSA, llvm::Triple::AMDPAL, DL, llvm::AsmPrinter::emitGlobalVariable(), llvm::AsmPrinter::emitLinkage(), llvm::AsmPrinter::emitVisibility(), llvm::GlobalValue::getAddressSpace(), llvm::GlobalObject::getAlign(), llvm::Module::getDataLayout(), llvm::GlobalVariable::getInitializer(), llvm::MCSymbol::getName(), llvm::Value::getName(), llvm::Triple::getOS(), llvm::GlobalValue::getParent(), llvm::AsmPrinter::getSymbol(), getTargetStreamer(), llvm::TargetMachine::getTargetTriple(), llvm::Optional< T >::getValueOr(), llvm::GlobalValue::getValueType(), llvm::GlobalValue::getVisibility(), llvm::GlobalVariable::hasInitializer(), llvm::GlobalValue::isDeclaration(), llvm::MCSymbol::isDefined(), llvm::MCSymbol::isVariable(), llvm::AMDGPUAS::LOCAL_ADDRESS, llvm::AsmPrinter::OutContext, llvm::MCSymbol::redefineIfPossible(), llvm::report_fatal_error(), llvm::MCContext::reportError(), and llvm::AsmPrinter::TM.
|
overridevirtual |
Implemented in AMDGPUMCInstLower.cpp.
Reimplemented from llvm::AsmPrinter.
Definition at line 173 of file AMDGPUMCInstLower.cpp.
References emitPseudoExpansionLowering(), llvm::MachineFunction::getSubtarget(), llvm::AsmPrinter::MF, MI, llvm::AsmPrinter::OutContext, and llvm::AsmPrinter::OutStreamer.
bool llvm::AMDGPUAsmPrinter::emitPseudoExpansionLowering | ( | MCStreamer & | OutStreamer, |
const MachineInstr * | MI | ||
) |
tblgen'erated driver function for lowering simple MI->MC pseudo instructions.
Referenced by emitInstruction().
|
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 116 of file AMDGPUAsmPrinter.cpp.
References IsTargetStreamerInitialized.
|
overrideprotectedvirtual |
Record analysis usage.
Reimplemented from llvm::AsmPrinter.
Definition at line 1162 of file AMDGPUAsmPrinter.cpp.
References llvm::AnalysisUsage::addPreserved(), llvm::AnalysisUsage::addRequired(), and llvm::AsmPrinter::getAnalysisUsage().
const MCSubtargetInfo * AMDGPUAsmPrinter::getGlobalSTI | ( | ) | const |
Definition at line 106 of file AMDGPUAsmPrinter.cpp.
References llvm::TargetMachine::getMCSubtargetInfo(), and llvm::AsmPrinter::TM.
Referenced by AMDGPUAsmPrinter(), doFinalization(), emitEndOfAsmFile(), emitFunctionBodyEnd(), emitFunctionBodyStart(), and emitFunctionEntryLabel().
|
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 102 of file AMDGPUAsmPrinter.cpp.
AMDGPUTargetStreamer * AMDGPUAsmPrinter::getTargetStreamer | ( | ) | const |
Definition at line 110 of file AMDGPUAsmPrinter.cpp.
References llvm::AsmPrinter::OutStreamer.
Referenced by doFinalization(), emitEndOfAsmFile(), emitFunctionBodyEnd(), emitFunctionBodyStart(), emitFunctionEntryLabel(), and emitGlobalVariable().
|
overridevirtual |
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 from llvm::AsmPrinter.
Definition at line 177 of file AMDGPUAsmPrinter.cpp.
References llvm::MachineBasicBlock::back(), llvm::MachineBasicBlock::empty(), llvm::MachineInstr::getOpcode(), llvm::AsmPrinter::isBlockOnlyReachableByFallthrough(), and MBB.
Referenced by emitBasicBlockStart().
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 167 of file AMDGPUMCInstLower.cpp.
References E, llvm::AsmPrinter::lowerConstant(), llvm::AsmPrinter::OutContext, and llvm::AsmPrinter::TM.
bool AMDGPUAsmPrinter::lowerOperand | ( | const MachineOperand & | MO, |
MCOperand & | MCOp | ||
) | const |
Wrapper for MCInstLowering.lowerOperand() for the tblgen'erated pseudo lowering.
Definition at line 160 of file AMDGPUMCInstLower.cpp.
References llvm::MachineFunction::getSubtarget(), llvm::AsmPrinter::MF, and llvm::AsmPrinter::OutContext.
|
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 1122 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::isUInt< 16 >(), llvm::isUInt< 32 >(), llvm::AsmPrinter::MF, MI, llvm::RISCVFenceField::O, llvm::AsmPrinter::PrintAsmOperand(), and llvm::AMDGPUInstPrinter::printRegOperand().
|
overridevirtual |
Emit the specified function out to the OutStreamer.
Reimplemented from llvm::AsmPrinter.
Definition at line 452 of file AMDGPUAsmPrinter.cpp.
References llvm::SIProgramInfo::AccumOffset, Align, AMDHSA_BITS_GET, assert(), llvm::SIProgramInfo::ComputePGMRSrc2, llvm::SIProgramInfo::ComputePGMRSrc3GFX90A, Context, DisasmLineMaxLen, DisasmLines, llvm::GCNSubtarget::dumpCode(), llvm::AsmPrinter::emitFunctionBody(), llvm::empty(), llvm::SIProgramInfo::FloatMode, G_00B84C_SCRATCH_EN, G_00B84C_TGID_X_EN, G_00B84C_TGID_Y_EN, G_00B84C_TGID_Z_EN, G_00B84C_TIDIG_COMP_CNT, G_00B84C_TRAP_HANDLER, G_00B84C_USER_SGPR, llvm::MCObjectFileInfo::getContext(), llvm::MCAssembler::getEmitterPtr(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::AsmPrinter::getObjFileLowering(), llvm::GlobalValue::getParent(), llvm::AMDGPUResourceUsageAnalysis::getResourceInfo(), llvm::MachineFunction::getSubtarget(), llvm::GCNSubtarget::hasGFX90AInsts(), llvm::GCNSubtarget::hasMAIInsts(), HexLines, i, llvm::SIProgramInfo::IEEEMode, Info, llvm::AMDGPUSubtarget::isAmdHsaOS(), llvm::AMDGPUSubtarget::isAmdPalOS(), llvm::AMDGPUMachineFunction::isEntryFunction(), llvm::AMDGPUMachineFunction::isModuleEntryFunction(), IsTargetStreamerInitialized, llvm::AsmPrinter::isVerbose(), 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::OutStreamer, llvm::SIProgramInfo::ScratchSize, llvm::MachineFunction::setAlignment(), llvm::AsmPrinter::SetupMachineFunction(), llvm::SIProgramInfo::SGPRBlocks, llvm::ELF::SHT_PROGBITS, llvm::size(), and llvm::SIProgramInfo::VGPRBlocks.
|
protected |
Definition at line 136 of file AMDGPUAsmPrinter.h.
Referenced by emitBasicBlockStart(), emitFunctionEntryLabel(), and runOnMachineFunction().
|
protected |
Definition at line 135 of file AMDGPUAsmPrinter.h.
Referenced by emitBasicBlockStart(), emitFunctionEntryLabel(), and runOnMachineFunction().
|
protected |
Definition at line 135 of file AMDGPUAsmPrinter.h.
Referenced by emitBasicBlockStart(), emitFunctionEntryLabel(), and runOnMachineFunction().
|
protected |
Definition at line 137 of file AMDGPUAsmPrinter.h.
Referenced by emitEndOfAsmFile(), emitStartOfAsmFile(), and runOnMachineFunction().