LLVM 20.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4 Class Reference

#include "Target/AMDGPU/AMDGPUHSAMetadataStreamer.h"

Inheritance diagram for llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4:
Inheritance graph
[legend]

Public Member Functions

 MetadataStreamerMsgPackV4 ()=default
 
 ~MetadataStreamerMsgPackV4 ()=default
 
bool emitTo (AMDGPUTargetStreamer &TargetStreamer) override
 
void begin (const Module &Mod, const IsaInfo::AMDGPUTargetID &TargetID) override
 
void end () override
 
void emitKernel (const MachineFunction &MF, const SIProgramInfo &ProgramInfo) override
 
- Public Member Functions inherited from llvm::AMDGPU::HSAMD::MetadataStreamer
virtual ~MetadataStreamer ()=default
 
virtual bool emitTo (AMDGPUTargetStreamer &TargetStreamer)=0
 
virtual void begin (const Module &Mod, const IsaInfo::AMDGPUTargetID &TargetID)=0
 
virtual void end ()=0
 
virtual void emitKernel (const MachineFunction &MF, const SIProgramInfo &ProgramInfo)=0
 

Protected Member Functions

void dump (StringRef HSAMetadataString) const
 
void verify (StringRef HSAMetadataString) const
 
std::optional< StringRefgetAccessQualifier (StringRef AccQual) const
 
std::optional< StringRefgetAddressSpaceQualifier (unsigned AddressSpace) const
 
StringRef getValueKind (Type *Ty, StringRef TypeQual, StringRef BaseTypeName) const
 
std::string getTypeName (Type *Ty, bool Signed) const
 
msgpack::ArrayDocNode getWorkGroupDimensions (MDNode *Node) const
 
msgpack::MapDocNode getHSAKernelProps (const MachineFunction &MF, const SIProgramInfo &ProgramInfo, unsigned CodeObjectVersion) const
 
void emitVersion () override
 
void emitTargetID (const IsaInfo::AMDGPUTargetID &TargetID)
 
void emitPrintf (const Module &Mod)
 
void emitKernelLanguage (const Function &Func, msgpack::MapDocNode Kern)
 
void emitKernelAttrs (const Function &Func, msgpack::MapDocNode Kern) override
 
void emitKernelArgs (const MachineFunction &MF, msgpack::MapDocNode Kern)
 
void emitKernelArg (const Argument &Arg, unsigned &Offset, msgpack::ArrayDocNode Args)
 
void emitKernelArg (const DataLayout &DL, Type *Ty, Align Alignment, StringRef ValueKind, unsigned &Offset, msgpack::ArrayDocNode Args, MaybeAlign PointeeAlign=std::nullopt, StringRef Name="", StringRef TypeName="", StringRef BaseTypeName="", StringRef ActAccQual="", StringRef AccQual="", StringRef TypeQual="")
 
void emitHiddenKernelArgs (const MachineFunction &MF, unsigned &Offset, msgpack::ArrayDocNode Args) override
 
msgpack::DocNodegetRootMetadata (StringRef Key)
 
msgpack::DocNodegetHSAMetadataRoot ()
 
virtual void emitVersion ()=0
 
virtual void emitHiddenKernelArgs (const MachineFunction &MF, unsigned &Offset, msgpack::ArrayDocNode Args)=0
 
virtual void emitKernelAttrs (const Function &Func, msgpack::MapDocNode Kern)=0
 

Protected Attributes

std::unique_ptr< DelayedMCExprsDelayedExprs
 
std::unique_ptr< msgpack::DocumentHSAMetadataDoc
 

Detailed Description

Definition at line 66 of file AMDGPUHSAMetadataStreamer.h.

Constructor & Destructor Documentation

◆ MetadataStreamerMsgPackV4()

llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::MetadataStreamerMsgPackV4 ( )
default

◆ ~MetadataStreamerMsgPackV4()

llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::~MetadataStreamerMsgPackV4 ( )
default

Member Function Documentation

◆ begin()

void llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::begin ( const Module Mod,
const IsaInfo::AMDGPUTargetID TargetID 
)
overridevirtual

◆ dump()

void llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::dump ( StringRef  HSAMetadataString) const
protected

Definition at line 56 of file AMDGPUHSAMetadataStreamer.cpp.

References llvm::errs().

Referenced by end().

◆ emitHiddenKernelArgs()

void llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitHiddenKernelArgs ( const MachineFunction MF,
unsigned Offset,
msgpack::ArrayDocNode  Args 
)
overrideprotectedvirtual

◆ emitKernel()

void llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernel ( const MachineFunction MF,
const SIProgramInfo ProgramInfo 
)
overridevirtual

◆ emitKernelArg() [1/2]

void llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelArg ( const Argument Arg,
unsigned Offset,
msgpack::ArrayDocNode  Args 
)
protected

◆ emitKernelArg() [2/2]

void llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelArg ( const DataLayout DL,
Type Ty,
Align  Alignment,
StringRef  ValueKind,
unsigned Offset,
msgpack::ArrayDocNode  Args,
MaybeAlign  PointeeAlign = std::nullopt,
StringRef  Name = "",
StringRef  TypeName = "",
StringRef  BaseTypeName = "",
StringRef  ActAccQual = "",
StringRef  AccQual = "",
StringRef  TypeQual = "" 
)
protected

◆ emitKernelArgs()

void llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelArgs ( const MachineFunction MF,
msgpack::MapDocNode  Kern 
)
protected

◆ emitKernelAttrs()

void llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelAttrs ( const Function Func,
msgpack::MapDocNode  Kern 
)
overrideprotectedvirtual

◆ emitKernelLanguage()

void llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitKernelLanguage ( const Function Func,
msgpack::MapDocNode  Kern 
)
protected

◆ emitPrintf()

void llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitPrintf ( const Module Mod)
protected

◆ emitTargetID()

void llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitTargetID ( const IsaInfo::AMDGPUTargetID TargetID)
protected

◆ emitTo()

bool llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitTo ( AMDGPUTargetStreamer TargetStreamer)
overridevirtual

◆ emitVersion()

void llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::emitVersion ( )
overrideprotectedvirtual

◆ end()

void llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::end ( )
overridevirtual

◆ getAccessQualifier()

std::optional< StringRef > llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getAccessQualifier ( StringRef  AccQual) const
protected

Definition at line 82 of file AMDGPUHSAMetadataStreamer.cpp.

References llvm::AMDGPU::HSAMD::Default.

Referenced by emitKernelArg().

◆ getAddressSpaceQualifier()

std::optional< StringRef > llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getAddressSpaceQualifier ( unsigned  AddressSpace) const
protected

◆ getHSAKernelProps()

msgpack::MapDocNode llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getHSAKernelProps ( const MachineFunction MF,
const SIProgramInfo ProgramInfo,
unsigned  CodeObjectVersion 
) const
protected

◆ getHSAMetadataRoot()

msgpack::DocNode & llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getHSAMetadataRoot ( )
inlineprotected

Definition at line 125 of file AMDGPUHSAMetadataStreamer.h.

◆ getRootMetadata()

msgpack::DocNode & llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getRootMetadata ( StringRef  Key)
inlineprotected

◆ getTypeName()

std::string llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getTypeName ( Type Ty,
bool  Signed 
) const
protected

◆ getValueKind()

StringRef llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getValueKind ( Type Ty,
StringRef  TypeQual,
StringRef  BaseTypeName 
) const
protected

◆ getWorkGroupDimensions()

msgpack::ArrayDocNode llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::getWorkGroupDimensions ( MDNode Node) const
protected

Definition at line 177 of file AMDGPUHSAMetadataStreamer.cpp.

References HSAMetadataDoc.

Referenced by emitKernelAttrs().

◆ verify()

void llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::verify ( StringRef  HSAMetadataString) const
protected

Member Data Documentation

◆ DelayedExprs

std::unique_ptr<DelayedMCExprs> llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::DelayedExprs
protected
Initial value:
=
std::make_unique<DelayedMCExprs>()

Definition at line 69 of file AMDGPUHSAMetadataStreamer.h.

Referenced by begin(), emitTo(), end(), and getHSAKernelProps().

◆ HSAMetadataDoc

std::unique_ptr<msgpack::Document> llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV4::HSAMetadataDoc
protected

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