LLVM  9.0.0svn
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
llvm::AMDGPUTargetStreamer Class Referenceabstract

#include "Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h"

Inheritance diagram for llvm::AMDGPUTargetStreamer:
Inheritance graph
[legend]
Collaboration diagram for llvm::AMDGPUTargetStreamer:
Collaboration graph
[legend]

Public Member Functions

 AMDGPUTargetStreamer (MCStreamer &S)
 
virtual void EmitDirectiveAMDGCNTarget (StringRef Target)=0
 
virtual void EmitDirectiveHSACodeObjectVersion (uint32_t Major, uint32_t Minor)=0
 
virtual void EmitDirectiveHSACodeObjectISA (uint32_t Major, uint32_t Minor, uint32_t Stepping, StringRef VendorName, StringRef ArchName)=0
 
virtual void EmitAMDKernelCodeT (const amd_kernel_code_t &Header)=0
 
virtual void EmitAMDGPUSymbolType (StringRef SymbolName, unsigned Type)=0
 
virtual bool EmitISAVersion (StringRef IsaVersionString)=0
 
virtual bool EmitHSAMetadataV2 (StringRef HSAMetadataString)
 
virtual bool EmitHSAMetadataV3 (StringRef HSAMetadataString)
 
virtual bool EmitHSAMetadata (std::shared_ptr< msgpack::Node > &HSAMetadata, bool Strict)=0
 Emit HSA Metadata. More...
 
virtual bool EmitHSAMetadata (const AMDGPU::HSAMD::Metadata &HSAMetadata)=0
 
virtual bool EmitPALMetadata (const AMDGPU::PALMD::Metadata &PALMetadata)=0
 
virtual void EmitAmdhsaKernelDescriptor (const MCSubtargetInfo &STI, StringRef KernelName, const amdhsa::kernel_descriptor_t &KernelDescriptor, uint64_t NextVGPR, uint64_t NextSGPR, bool ReserveVCC, bool ReserveFlatScr, bool ReserveXNACK)=0
 
- Public Member Functions inherited from llvm::MCTargetStreamer
 MCTargetStreamer (MCStreamer &S)
 
virtual ~MCTargetStreamer ()
 
MCStreamergetStreamer ()
 
virtual void emitLabel (MCSymbol *Symbol)
 
virtual void emitAssignment (MCSymbol *Symbol, const MCExpr *Value)
 
virtual void prettyPrintAsm (MCInstPrinter &InstPrinter, raw_ostream &OS, const MCInst &Inst, const MCSubtargetInfo &STI)
 
virtual void emitDwarfFileDirective (StringRef Directive)
 
virtual void changeSection (const MCSection *CurSection, MCSection *Section, const MCExpr *SubSection, raw_ostream &OS)
 Update streamer for a new active section. More...
 
virtual void emitValue (const MCExpr *Value)
 
virtual void emitRawBytes (StringRef Data)
 Emit the bytes in Data into the output. More...
 
virtual void finish ()
 

Static Public Member Functions

static StringRef getArchNameFromElfMach (unsigned ElfMach)
 
static unsigned getElfMach (StringRef GPU)
 

Protected Member Functions

MCContextgetContext () const
 

Additional Inherited Members

- Protected Attributes inherited from llvm::MCTargetStreamer
MCStreamerStreamer
 

Detailed Description

Definition at line 30 of file AMDGPUTargetStreamer.h.

Constructor & Destructor Documentation

◆ AMDGPUTargetStreamer()

llvm::AMDGPUTargetStreamer::AMDGPUTargetStreamer ( MCStreamer S)
inline

Member Function Documentation

◆ EmitAMDGPUSymbolType()

virtual void llvm::AMDGPUTargetStreamer::EmitAMDGPUSymbolType ( StringRef  SymbolName,
unsigned  Type 
)
pure virtual

◆ EmitAmdhsaKernelDescriptor()

virtual void llvm::AMDGPUTargetStreamer::EmitAmdhsaKernelDescriptor ( const MCSubtargetInfo STI,
StringRef  KernelName,
const amdhsa::kernel_descriptor_t KernelDescriptor,
uint64_t  NextVGPR,
uint64_t  NextSGPR,
bool  ReserveVCC,
bool  ReserveFlatScr,
bool  ReserveXNACK 
)
pure virtual

◆ EmitAMDKernelCodeT()

virtual void llvm::AMDGPUTargetStreamer::EmitAMDKernelCodeT ( const amd_kernel_code_t Header)
pure virtual

◆ EmitDirectiveAMDGCNTarget()

virtual void llvm::AMDGPUTargetStreamer::EmitDirectiveAMDGCNTarget ( StringRef  Target)
pure virtual

◆ EmitDirectiveHSACodeObjectISA()

virtual void llvm::AMDGPUTargetStreamer::EmitDirectiveHSACodeObjectISA ( uint32_t  Major,
uint32_t  Minor,
uint32_t  Stepping,
StringRef  VendorName,
StringRef  ArchName 
)
pure virtual

◆ EmitDirectiveHSACodeObjectVersion()

virtual void llvm::AMDGPUTargetStreamer::EmitDirectiveHSACodeObjectVersion ( uint32_t  Major,
uint32_t  Minor 
)
pure virtual

◆ EmitHSAMetadata() [1/2]

virtual bool llvm::AMDGPUTargetStreamer::EmitHSAMetadata ( std::shared_ptr< msgpack::Node > &  HSAMetadata,
bool  Strict 
)
pure virtual

Emit HSA Metadata.

When Strict is true, known metadata elements must already be well-typed. When Strict is false, known types are inferred and the HSAMetadata structure is updated with the correct types.

Returns
True on success, false on failure.

Implemented in llvm::AMDGPUTargetELFStreamer, and llvm::AMDGPUTargetAsmStreamer.

Referenced by AMDGPUTargetStreamer(), llvm::AMDGPU::HSAMD::MetadataStreamerV3::emitTo(), and llvm::AMDGPU::HSAMD::MetadataStreamerV2::emitTo().

◆ EmitHSAMetadata() [2/2]

virtual bool llvm::AMDGPUTargetStreamer::EmitHSAMetadata ( const AMDGPU::HSAMD::Metadata HSAMetadata)
pure virtual
Returns
True on success, false on failure.

Implemented in llvm::AMDGPUTargetELFStreamer, and llvm::AMDGPUTargetAsmStreamer.

◆ EmitHSAMetadataV2()

bool AMDGPUTargetStreamer::EmitHSAMetadataV2 ( StringRef  HSAMetadataString)
virtual
Returns
True on success, false on failure.

Definition at line 45 of file AMDGPUTargetStreamer.cpp.

References llvm::AMDGPU::HSAMD::fromString().

Referenced by AMDGPUTargetStreamer().

◆ EmitHSAMetadataV3()

bool AMDGPUTargetStreamer::EmitHSAMetadataV3 ( StringRef  HSAMetadataString)
virtual
Returns
True on success, false on failure.

Definition at line 53 of file AMDGPUTargetStreamer.cpp.

Referenced by AMDGPUTargetStreamer().

◆ EmitISAVersion()

virtual bool llvm::AMDGPUTargetStreamer::EmitISAVersion ( StringRef  IsaVersionString)
pure virtual
Returns
True on success, false on failure.

Implemented in llvm::AMDGPUTargetELFStreamer, and llvm::AMDGPUTargetAsmStreamer.

Referenced by AMDGPUTargetStreamer(), and llvm::AMDGPUAsmPrinter::EmitEndOfAsmFile().

◆ EmitPALMetadata()

virtual bool llvm::AMDGPUTargetStreamer::EmitPALMetadata ( const AMDGPU::PALMD::Metadata PALMetadata)
pure virtual
Returns
True on success, false on failure.

Implemented in llvm::AMDGPUTargetELFStreamer, and llvm::AMDGPUTargetAsmStreamer.

Referenced by AMDGPUTargetStreamer(), and llvm::AMDGPUAsmPrinter::EmitEndOfAsmFile().

◆ getArchNameFromElfMach()

StringRef AMDGPUTargetStreamer::getArchNameFromElfMach ( unsigned  ElfMach)
static

Definition at line 62 of file AMDGPUTargetStreamer.cpp.

References llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX600, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX601, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX700, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX701, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX702, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX703, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX704, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX801, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX802, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX803, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX810, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX900, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX902, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX904, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX906, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX909, llvm::ELF::EF_AMDGPU_MACH_NONE, llvm::ELF::EF_AMDGPU_MACH_R600_BARTS, llvm::ELF::EF_AMDGPU_MACH_R600_CAICOS, llvm::ELF::EF_AMDGPU_MACH_R600_CAYMAN, llvm::ELF::EF_AMDGPU_MACH_R600_CEDAR, llvm::ELF::EF_AMDGPU_MACH_R600_CYPRESS, llvm::ELF::EF_AMDGPU_MACH_R600_JUNIPER, llvm::ELF::EF_AMDGPU_MACH_R600_R600, llvm::ELF::EF_AMDGPU_MACH_R600_R630, llvm::ELF::EF_AMDGPU_MACH_R600_REDWOOD, llvm::ELF::EF_AMDGPU_MACH_R600_RS880, llvm::ELF::EF_AMDGPU_MACH_R600_RV670, llvm::ELF::EF_AMDGPU_MACH_R600_RV710, llvm::ELF::EF_AMDGPU_MACH_R600_RV730, llvm::ELF::EF_AMDGPU_MACH_R600_RV770, llvm::ELF::EF_AMDGPU_MACH_R600_SUMO, llvm::ELF::EF_AMDGPU_MACH_R600_TURKS, llvm::AMDGPU::getArchNameAMDGCN(), llvm::AMDGPU::getArchNameR600(), llvm::AMDGPU::GK_BARTS, llvm::AMDGPU::GK_CAICOS, llvm::AMDGPU::GK_CAYMAN, llvm::AMDGPU::GK_CEDAR, llvm::AMDGPU::GK_CYPRESS, llvm::AMDGPU::GK_GFX600, llvm::AMDGPU::GK_GFX601, llvm::AMDGPU::GK_GFX700, llvm::AMDGPU::GK_GFX701, llvm::AMDGPU::GK_GFX702, llvm::AMDGPU::GK_GFX703, llvm::AMDGPU::GK_GFX704, llvm::AMDGPU::GK_GFX801, llvm::AMDGPU::GK_GFX802, llvm::AMDGPU::GK_GFX803, llvm::AMDGPU::GK_GFX810, llvm::AMDGPU::GK_GFX900, llvm::AMDGPU::GK_GFX902, llvm::AMDGPU::GK_GFX904, llvm::AMDGPU::GK_GFX906, llvm::AMDGPU::GK_GFX909, llvm::AMDGPU::GK_JUNIPER, llvm::AMDGPU::GK_NONE, llvm::AMDGPU::GK_R600, llvm::AMDGPU::GK_R630, llvm::AMDGPU::GK_REDWOOD, llvm::AMDGPU::GK_RS880, llvm::AMDGPU::GK_RV670, llvm::AMDGPU::GK_RV710, llvm::AMDGPU::GK_RV730, llvm::AMDGPU::GK_RV770, llvm::AMDGPU::GK_SUMO, and llvm::AMDGPU::GK_TURKS.

Referenced by AMDGPUTargetStreamer().

◆ getContext()

MCContext& llvm::AMDGPUTargetStreamer::getContext ( ) const
inlineprotected

◆ getElfMach()

unsigned AMDGPUTargetStreamer::getElfMach ( StringRef  GPU)
static

Definition at line 107 of file AMDGPUTargetStreamer.cpp.

References llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX600, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX601, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX700, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX701, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX702, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX703, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX704, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX801, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX802, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX803, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX810, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX900, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX902, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX904, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX906, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX909, llvm::ELF::EF_AMDGPU_MACH_NONE, llvm::ELF::EF_AMDGPU_MACH_R600_BARTS, llvm::ELF::EF_AMDGPU_MACH_R600_CAICOS, llvm::ELF::EF_AMDGPU_MACH_R600_CAYMAN, llvm::ELF::EF_AMDGPU_MACH_R600_CEDAR, llvm::ELF::EF_AMDGPU_MACH_R600_CYPRESS, llvm::ELF::EF_AMDGPU_MACH_R600_JUNIPER, llvm::ELF::EF_AMDGPU_MACH_R600_R600, llvm::ELF::EF_AMDGPU_MACH_R600_R630, llvm::ELF::EF_AMDGPU_MACH_R600_REDWOOD, llvm::ELF::EF_AMDGPU_MACH_R600_RS880, llvm::ELF::EF_AMDGPU_MACH_R600_RV670, llvm::ELF::EF_AMDGPU_MACH_R600_RV710, llvm::ELF::EF_AMDGPU_MACH_R600_RV730, llvm::ELF::EF_AMDGPU_MACH_R600_RV770, llvm::ELF::EF_AMDGPU_MACH_R600_SUMO, llvm::ELF::EF_AMDGPU_MACH_R600_TURKS, llvm::AMDGPU::GK_BARTS, llvm::AMDGPU::GK_CAICOS, llvm::AMDGPU::GK_CAYMAN, llvm::AMDGPU::GK_CEDAR, llvm::AMDGPU::GK_CYPRESS, llvm::AMDGPU::GK_GFX600, llvm::AMDGPU::GK_GFX601, llvm::AMDGPU::GK_GFX700, llvm::AMDGPU::GK_GFX701, llvm::AMDGPU::GK_GFX702, llvm::AMDGPU::GK_GFX703, llvm::AMDGPU::GK_GFX704, llvm::AMDGPU::GK_GFX801, llvm::AMDGPU::GK_GFX802, llvm::AMDGPU::GK_GFX803, llvm::AMDGPU::GK_GFX810, llvm::AMDGPU::GK_GFX900, llvm::AMDGPU::GK_GFX902, llvm::AMDGPU::GK_GFX904, llvm::AMDGPU::GK_GFX906, llvm::AMDGPU::GK_GFX909, llvm::AMDGPU::GK_JUNIPER, llvm::AMDGPU::GK_NONE, llvm::AMDGPU::GK_R600, llvm::AMDGPU::GK_R630, llvm::AMDGPU::GK_REDWOOD, llvm::AMDGPU::GK_RS880, llvm::AMDGPU::GK_RV670, llvm::AMDGPU::GK_RV710, llvm::AMDGPU::GK_RV730, llvm::AMDGPU::GK_RV770, llvm::AMDGPU::GK_SUMO, llvm::AMDGPU::GK_TURKS, llvm_unreachable, llvm::AMDGPU::parseArchAMDGCN(), and llvm::AMDGPU::parseArchR600().

Referenced by llvm::AMDGPUTargetELFStreamer::AMDGPUTargetELFStreamer(), and AMDGPUTargetStreamer().


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