LLVM 20.0.0git
|
#include "Target/AMDGPU/AMDGPUHSAMetadataStreamer.h"
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 Attributes | |
std::unique_ptr< DelayedMCExprs > | DelayedExprs |
std::unique_ptr< msgpack::Document > | HSAMetadataDoc |
Definition at line 66 of file AMDGPUHSAMetadataStreamer.h.
|
default |
|
default |
|
overridevirtual |
Implements llvm::AMDGPU::HSAMD::MetadataStreamer.
Definition at line 535 of file AMDGPUHSAMetadataStreamer.cpp.
References DelayedExprs, emitPrintf(), emitTargetID(), emitVersion(), getRootMetadata(), HSAMetadataDoc, and llvm::Mod.
|
protected |
Definition at line 56 of file AMDGPUHSAMetadataStreamer.cpp.
References llvm::errs().
Referenced by end().
|
overrideprotectedvirtual |
Implements llvm::AMDGPU::HSAMD::MetadataStreamer.
Reimplemented in llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5.
Definition at line 389 of file AMDGPUHSAMetadataStreamer.cpp.
References llvm::alignTo(), DL, emitKernelArg(), llvm::PointerType::get(), llvm::MachineFunction::getFunction(), llvm::Type::getInt64Ty(), llvm::MachineFunction::getSubtarget(), llvm::AMDGPUAS::GLOBAL_ADDRESS, and llvm::Offset.
Referenced by emitKernelArgs().
|
overridevirtual |
Implements llvm::AMDGPU::HSAMD::MetadataStreamer.
Definition at line 556 of file AMDGPUHSAMetadataStreamer.cpp.
References llvm::CallingConv::AMDGPU_KERNEL, emitKernelArgs(), emitKernelAttrs(), emitKernelLanguage(), llvm::AMDGPU::getAMDHSACodeObjectVersion(), llvm::msgpack::DocNode::getArray(), llvm::msgpack::DocNode::getDocument(), llvm::MachineFunction::getFunction(), getHSAKernelProps(), llvm::msgpack::Document::getNode(), getRootMetadata(), and llvm::CallingConv::SPIR_KERNEL.
|
protected |
Definition at line 275 of file AMDGPUHSAMetadataStreamer.cpp.
References DL, emitKernelArg(), llvm::Argument::getArgNo(), getArgumentTypeAlign(), llvm::Value::getName(), llvm::Argument::getParamAlign(), llvm::Argument::getParamByRefType(), llvm::Argument::getParent(), llvm::Value::getType(), getValueKind(), llvm::Argument::hasAttribute(), llvm::Argument::hasByRefAttr(), llvm::Value::hasName(), llvm::Argument::hasNoAliasAttr(), llvm::Type::isPointerTy(), llvm::AMDGPUAS::LOCAL_ADDRESS, Name, llvm::Offset, llvm::Argument::onlyReadsMemory(), and llvm::MaybeAlign::valueOrOne().
Referenced by emitHiddenKernelArgs(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitHiddenKernelArgs(), emitKernelArg(), and emitKernelArgs().
|
protected |
Definition at line 340 of file AMDGPUHSAMetadataStreamer.cpp.
References llvm::alignTo(), DL, getAccessQualifier(), getAddressSpaceQualifier(), Name, llvm::Offset, Size, and llvm::StringRef::split().
|
protected |
Definition at line 258 of file AMDGPUHSAMetadataStreamer.cpp.
References emitHiddenKernelArgs(), emitKernelArg(), llvm::MachineFunction::getFunction(), HSAMetadataDoc, and llvm::Offset.
Referenced by emitKernel().
|
overrideprotectedvirtual |
Implements llvm::AMDGPU::HSAMD::MetadataStreamer.
Reimplemented in llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5.
Definition at line 233 of file AMDGPUHSAMetadataStreamer.cpp.
References llvm::msgpack::DocNode::getDocument(), llvm::msgpack::Document::getNode(), llvm::getTypeName(), and getWorkGroupDimensions().
Referenced by emitKernel(), and llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitKernelAttrs().
|
protected |
Definition at line 214 of file AMDGPUHSAMetadataStreamer.cpp.
References llvm::msgpack::Document::getArrayNode(), llvm::msgpack::DocNode::getDocument(), and llvm::msgpack::Document::getNode().
Referenced by emitKernel().
Definition at line 201 of file AMDGPUHSAMetadataStreamer.cpp.
References llvm::DWARFExpression::Operation::getNumOperands(), getRootMetadata(), HSAMetadataDoc, and llvm::Mod.
Referenced by begin().
|
protected |
Definition at line 195 of file AMDGPUHSAMetadataStreamer.cpp.
References getRootMetadata(), HSAMetadataDoc, and llvm::AMDGPU::IsaInfo::AMDGPUTargetID::toString().
Referenced by begin().
|
overridevirtual |
Implements llvm::AMDGPU::HSAMD::MetadataStreamer.
Definition at line 530 of file AMDGPUHSAMetadataStreamer.cpp.
References DelayedExprs, llvm::AMDGPUTargetStreamer::EmitHSAMetadata(), and HSAMetadataDoc.
|
overrideprotectedvirtual |
Implements llvm::AMDGPU::HSAMD::MetadataStreamer.
Reimplemented in llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5, and llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV6.
Definition at line 188 of file AMDGPUHSAMetadataStreamer.cpp.
References getRootMetadata(), HSAMetadataDoc, llvm::Version, llvm::AMDGPU::HSAMD::VersionMajorV4, and llvm::AMDGPU::HSAMD::VersionMinorV4.
Referenced by begin().
|
overridevirtual |
Implements llvm::AMDGPU::HSAMD::MetadataStreamer.
Definition at line 544 of file AMDGPUHSAMetadataStreamer.cpp.
References DelayedExprs, dump(), llvm::DumpHSAMetadata, HSAMetadataDoc, llvm::raw_string_ostream::str(), verify, and llvm::VerifyHSAMetadata.
|
protected |
Definition at line 82 of file AMDGPUHSAMetadataStreamer.cpp.
References llvm::AMDGPU::HSAMD::Default.
Referenced by emitKernelArg().
|
protected |
Definition at line 90 of file AMDGPUHSAMetadataStreamer.cpp.
References llvm::AMDGPUAS::CONSTANT_ADDRESS, llvm::AMDGPUAS::FLAT_ADDRESS, llvm::AMDGPUAS::GLOBAL_ADDRESS, llvm::AMDGPUAS::LOCAL_ADDRESS, llvm::AMDGPUAS::PRIVATE_ADDRESS, and llvm::AMDGPUAS::REGION_ADDRESS.
Referenced by emitKernelArg().
|
protected |
Definition at line 463 of file AMDGPUHSAMetadataStreamer.cpp.
References llvm::AMDGPU::AMDHSA_COV5, llvm::msgpack::Boolean, DelayedExprs, llvm::SIProgramInfo::DynamicCallStack, F, llvm::MachineFunction::getFunction(), llvm::MachineFunction::getInfo(), llvm::AMDGPUSubtarget::getKernArgSegmentSize(), llvm::MachineFunction::getSubtarget(), llvm::AMDGPUSubtarget::getWavefrontSize(), llvm::GCNSubtarget::hasMAIInsts(), HSAMetadataDoc, llvm::SIProgramInfo::LDSSize, llvm::SIProgramInfo::NumAccVGPR, llvm::SIProgramInfo::NumSGPR, llvm::SIProgramInfo::NumVGPR, llvm::SIProgramInfo::ScratchSize, llvm::GCNSubtarget::supportsWGP(), llvm::msgpack::UInt, value, and llvm::SIProgramInfo::WgpMode.
Referenced by emitKernel().
|
inlineprotected |
Definition at line 125 of file AMDGPUHSAMetadataStreamer.h.
|
inlineprotected |
Definition at line 121 of file AMDGPUHSAMetadataStreamer.h.
References llvm::msgpack::DocNode::getMap().
Referenced by begin(), emitKernel(), emitPrintf(), emitTargetID(), emitVersion(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitVersion(), and llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV6::emitVersion().
|
protected |
Definition at line 138 of file AMDGPUHSAMetadataStreamer.cpp.
References llvm::BitWidth, llvm::Type::DoubleTyID, llvm::Type::FixedVectorTyID, llvm::Type::FloatTyID, llvm::Type::getIntegerBitWidth(), llvm::Type::getTypeID(), llvm::getTypeName(), llvm::Type::HalfTyID, llvm::Type::IntegerTyID, and Signed.
|
protected |
Definition at line 111 of file AMDGPUHSAMetadataStreamer.cpp.
References llvm::StringSwitch< T, R >::Case(), llvm::StringRef::contains(), llvm::StringSwitch< T, R >::Default(), llvm::Type::getPointerAddressSpace(), and llvm::AMDGPUAS::LOCAL_ADDRESS.
Referenced by emitKernelArg().
|
protected |
Definition at line 177 of file AMDGPUHSAMetadataStreamer.cpp.
References HSAMetadataDoc.
Referenced by emitKernelAttrs().
|
protected |
Definition at line 60 of file AMDGPUHSAMetadataStreamer.cpp.
References llvm::errs(), llvm::msgpack::Document::fromYAML(), llvm::raw_string_ostream::str(), and llvm::msgpack::Document::toYAML().
|
protected |
Definition at line 69 of file AMDGPUHSAMetadataStreamer.h.
Referenced by begin(), emitTo(), end(), and getHSAKernelProps().
|
protected |
Definition at line 72 of file AMDGPUHSAMetadataStreamer.h.
Referenced by begin(), emitKernelArgs(), emitPrintf(), emitTargetID(), emitTo(), emitVersion(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV5::emitVersion(), llvm::AMDGPU::HSAMD::MetadataStreamerMsgPackV6::emitVersion(), end(), getHSAKernelProps(), and getWorkGroupDimensions().