Go to the documentation of this file.
9 #ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUTARGETSTREAMER_H
10 #define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUTARGETSTREAMER_H
22 class formatted_raw_ostream;
31 struct kernel_descriptor_t;
92 uint64_t NextSGPR,
bool ReserveVCC,
bool ReserveFlatScr) = 0;
111 getTargetID()->setTargetIDFromFeaturesString(FeatureString);
152 uint64_t NextSGPR,
bool ReserveVCC,
bool ReserveFlatScr)
override;
162 unsigned getEFlags();
164 unsigned getEFlagsR600();
165 unsigned getEFlagsAMDGCN();
167 unsigned getEFlagsUnknownOS();
168 unsigned getEFlagsAMDHSA();
169 unsigned getEFlagsAMDPAL();
170 unsigned getEFlagsMesa3D();
172 unsigned getEFlagsV3();
173 unsigned getEFlagsV4();
212 uint64_t NextSGPR,
bool ReserveVCC,
bool ReserveFlatScr)
override;
const Optional< AMDGPU::IsaInfo::AMDGPUTargetID > & getTargetID() const
This is an optimization pass for GlobalISel generic memory operations.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
MCContext & getContext() const
bool EmitISAVersion() override
Context object for machine code objects.
AMDGPUTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS)
virtual void EmitDirectiveAMDGCNTarget()=0
void EmitAmdhsaKernelDescriptor(const MCSubtargetInfo &STI, StringRef KernelName, const amdhsa::kernel_descriptor_t &KernelDescriptor, uint64_t NextVGPR, uint64_t NextSGPR, bool ReserveVCC, bool ReserveFlatScr) override
The instances of the Type class are immutable: once they are created, they are never changed.
void EmitDirectiveHSACodeObjectVersion(uint32_t Major, uint32_t Minor) override
virtual void EmitDirectiveHSACodeObjectVersion(uint32_t Major, uint32_t Minor)=0
virtual void EmitAMDKernelCodeT(const amd_kernel_code_t &Header)=0
void initializeTargetID(const MCSubtargetInfo &STI)
bool EmitHSAMetadata(msgpack::Document &HSAMetadata, bool Strict) override
Optional< AMDGPU::IsaInfo::AMDGPUTargetID > TargetID
bool EmitCodeEnd(const MCSubtargetInfo &STI) override
Streaming machine code generation interface.
void EmitAMDKernelCodeT(const amd_kernel_code_t &Header) override
virtual bool EmitHSAMetadata(msgpack::Document &HSAMetadata, bool Strict)=0
Emit HSA Metadata.
void EmitAMDGPUSymbolType(StringRef SymbolName, unsigned Type) override
AMDGPUTargetStreamer(MCStreamer &S)
Simple in-memory representation of a document of msgpack objects with ability to find and create arra...
virtual void emitAMDGPULDS(MCSymbol *Symbol, unsigned Size, Align Alignment)=0
void EmitDirectiveAMDGCNTarget() override
Target specific streamer interface.
This struct is a compact representation of a valid (non-zero power of two) alignment.
void EmitDirectiveHSACodeObjectISAV2(uint32_t Major, uint32_t Minor, uint32_t Stepping, StringRef VendorName, StringRef ArchName) override
virtual void EmitAmdhsaKernelDescriptor(const MCSubtargetInfo &STI, StringRef KernelName, const amdhsa::kernel_descriptor_t &KernelDescriptor, uint64_t NextVGPR, uint64_t NextSGPR, bool ReserveVCC, bool ReserveFlatScr)=0
An efficient, type-erasing, non-owning reference to a callable.
void EmitDirectiveHSACodeObjectVersion(uint32_t Major, uint32_t Minor) override
void EmitDirectiveAMDGCNTarget() override
void EmitDirectiveHSACodeObjectISAV2(uint32_t Major, uint32_t Minor, uint32_t Stepping, StringRef VendorName, StringRef ArchName) override
virtual bool EmitHSAMetadataV2(StringRef HSAMetadataString)
void initializeTargetID(const MCSubtargetInfo &STI, StringRef FeatureString)
virtual bool EmitISAVersion()=0
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MCELFStreamer & getStreamer()
virtual bool EmitHSAMetadataV3(StringRef HSAMetadataString)
void emitAMDGPULDS(MCSymbol *Sym, unsigned Size, Align Alignment) override
void EmitAMDKernelCodeT(const amd_kernel_code_t &Header) override
void EmitAmdhsaKernelDescriptor(const MCSubtargetInfo &STI, StringRef KernelName, const amdhsa::kernel_descriptor_t &KernelDescriptor, uint64_t NextVGPR, uint64_t NextSGPR, bool ReserveVCC, bool ReserveFlatScr) override
virtual bool EmitCodeEnd(const MCSubtargetInfo &STI)=0
StringRef - Represent a constant reference to a string, i.e.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
AMD Kernel Code Object (amd_kernel_code_t).
constexpr char SymbolName[]
Key for Kernel::Metadata::mSymbolName.
virtual void EmitAMDGPUSymbolType(StringRef SymbolName, unsigned Type)=0
static StringRef getArchNameFromElfMach(unsigned ElfMach)
virtual void EmitDirectiveHSACodeObjectISAV2(uint32_t Major, uint32_t Minor, uint32_t Stepping, StringRef VendorName, StringRef ArchName)=0
void EmitAMDGPUSymbolType(StringRef SymbolName, unsigned Type) override
MCContext & getContext() const
AMDGPUPALMetadata * getPALMetadata()
bool EmitHSAMetadata(msgpack::Document &HSAMetadata, bool Strict) override
bool EmitISAVersion() override
Generic base class for all target subtargets.
bool EmitCodeEnd(const MCSubtargetInfo &STI) override
Base class for the full range of assembler expressions which are needed for parsing.
void emitAMDGPULDS(MCSymbol *Sym, unsigned Size, Align Alignment) override
Optional< AMDGPU::IsaInfo::AMDGPUTargetID > & getTargetID()
AMDGPUTargetELFStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
static unsigned getElfMach(StringRef GPU)