16 #ifndef LLVM_SUPPORT_AMDGPUMETADATA_H 17 #define LLVM_SUPPORT_AMDGPUMETADATA_H 21 #include <system_error> 122 std::vector<uint32_t> mReqdWorkGroupSize = std::vector<uint32_t>();
124 std::vector<uint32_t> mWorkGroupSizeHint = std::vector<uint32_t>();
126 std::string mVecTypeHint = std::string();
129 std::string mRuntimeHandle = std::string();
141 return !mReqdWorkGroupSize.empty() || !mWorkGroupSizeHint.empty() ||
142 !mVecTypeHint.empty() || !mRuntimeHandle.empty();
155 constexpr
char Name[] =
"Name";
159 constexpr
char Size[] =
"Size";
187 std::string mName = std::string();
189 std::string mTypeName = std::string();
207 bool mIsConst =
false;
209 bool mIsRestrict =
false;
211 bool mIsVolatile =
false;
213 bool mIsPipe =
false;
257 uint64_t mKernargSegmentSize = 0;
271 uint16_t mNumSGPRs = 0;
273 uint16_t mNumVGPRs = 0;
278 bool mIsDynamicCallStack =
false;
281 bool mIsXNACKEnabled =
false;
283 uint16_t mNumSpilledSGPRs = 0;
285 uint16_t mNumSpilledVGPRs = 0;
322 "WavefrontPrivateSegmentOffsetSGPR";
328 std::vector<uint32_t> mDebuggerABIVersion = std::vector<uint32_t>();
331 uint16_t mReservedNumVGPRs = 0;
334 uint16_t mReservedFirstVGPR = uint16_t(-1);
338 uint16_t mPrivateSegmentBufferSGPR = uint16_t(-1);
342 uint16_t mWavefrontPrivateSegmentOffsetSGPR = uint16_t(-1);
356 return !mDebuggerABIVersion.empty();
364 constexpr
char Name[] =
"Name";
374 constexpr
char Args[] =
"Args";
384 std::string mName = std::string();
386 std::string mSymbolName = std::string();
388 std::string mLanguage = std::string();
390 std::vector<uint32_t> mLanguageVersion = std::vector<uint32_t>();
394 std::vector<Arg::Metadata> mArgs = std::vector<Arg::Metadata>();
418 std::vector<uint32_t> mVersion = std::vector<uint32_t>();
420 std::vector<std::string> mPrintf = std::vector<std::string>();
422 std::vector<Kernel::Metadata> mKernels = std::vector<Kernel::Metadata>();
444 constexpr
char AssemblerDirectiveBegin[] =
".amdgpu_metadata";
446 constexpr
char AssemblerDirectiveEnd[] =
".end_amdgpu_metadata";
490 std::error_code
toString(
const Metadata &PALMetadata, std::string &String);
496 #endif // LLVM_SUPPORT_AMDGPUMETADATA_H constexpr char IsXNACKEnabled[]
Key for Kernel::CodeProps::Metadata::mIsXNACKEnabled.
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
constexpr char GroupSegmentFixedSize[]
Key for Kernel::CodeProps::Metadata::mGroupSegmentFixedSize.
This class represents lattice values for constants.
constexpr char IsVolatile[]
Key for Kernel::Arg::Metadata::mIsVolatile.
constexpr char PointeeAlign[]
Key for Kernel::Arg::Metadata::mPointeeAlign.
constexpr char ReqdWorkGroupSize[]
Key for Kernel::Attr::Metadata::mReqdWorkGroupSize.
constexpr char KernargSegmentAlign[]
Key for Kernel::CodeProps::Metadata::mKernargSegmentAlign.
constexpr char RuntimeHandle[]
Key for Kernel::Attr::Metadata::mRuntimeHandle.
constexpr char ReservedFirstVGPR[]
Key for Kernel::DebugProps::Metadata::mReservedFirstVGPR.
constexpr char NumSpilledSGPRs[]
Key for Kernel::CodeProps::Metadata::mNumSpilledSGPRs.
constexpr char PrivateSegmentBufferSGPR[]
Key for Kernel::DebugProps::Metadata::mPrivateSegmentBufferSGPR.
constexpr char Language[]
Key for Kernel::Metadata::mLanguage.
constexpr char KernargSegmentSize[]
Key for Kernel::CodeProps::Metadata::mKernargSegmentSize.
amdgpu Simplify well known AMD library false Value Value const Twine & Name
constexpr char SymbolName[]
Key for Kernel::Metadata::mSymbolName.
constexpr char AddrSpaceQual[]
Key for Kernel::Arg::Metadata::mAddrSpaceQual.
constexpr char Printf[]
Key for HSA::Metadata::mPrintf.
constexpr char DebuggerABIVersion[]
Key for Kernel::DebugProps::Metadata::mDebuggerABIVersion.
std::error_code fromString(std::string String, Metadata &HSAMetadata)
Converts String to HSAMetadata.
constexpr char Attrs[]
Key for Kernel::Metadata::mAttrs.
constexpr char IsPipe[]
Key for Kernel::Arg::Metadata::mIsPipe.
constexpr char AssemblerDirectiveBegin[]
HSA metadata beginning assembler directive.
This is an important base class in LLVM.
constexpr char WavefrontSize[]
Key for Kernel::CodeProps::Metadata::mWavefrontSize.
constexpr char TypeName[]
Key for Kernel::Arg::Metadata::mTypeName.
constexpr char ActualAccQual[]
Key for Kernel::Arg::Metadata::mActualAccQual.
constexpr char AssemblerDirectiveEnd[]
HSA metadata ending assembler directive.
constexpr char IsDynamicCallStack[]
Key for Kernel::CodeProps::Metadata::mIsDynamicCallStack.
constexpr char AssemblerDirective[]
PAL metadata assembler directive.
constexpr char Version[]
Key for HSA::Metadata::mVersion.
constexpr char NumSGPRs[]
Key for Kernel::CodeProps::Metadata::mNumSGPRs.
AccessQualifier
Access qualifiers.
constexpr char IsRestrict[]
Key for Kernel::Arg::Metadata::mIsRestrict.
constexpr char CodeProps[]
Key for Kernel::Metadata::mCodeProps.
constexpr char LanguageVersion[]
Key for Kernel::Metadata::mLanguageVersion.
constexpr uint32_t VersionMinor
HSA metadata minor version.
constexpr char MaxFlatWorkGroupSize[]
Key for Kernel::CodeProps::Metadata::mMaxFlatWorkGroupSize.
constexpr char NumVGPRs[]
Key for Kernel::CodeProps::Metadata::mNumVGPRs.
constexpr char Kernels[]
Key for HSA::Metadata::mKernels.
amdgpu Simplify well known AMD library false Value Value * Arg
constexpr char PrivateSegmentFixedSize[]
Key for Kernel::CodeProps::Metadata::mPrivateSegmentFixedSize.
std::error_code toString(Metadata HSAMetadata, std::string &String)
Converts HSAMetadata to String.
constexpr char NumSpilledVGPRs[]
Key for Kernel::CodeProps::Metadata::mNumSpilledVGPRs.
constexpr char DebugProps[]
Key for Kernel::Metadata::mDebugProps.
AddressSpaceQualifier
Address space qualifiers.
constexpr char VecTypeHint[]
Key for Kernel::Attr::Metadata::mVecTypeHint.
constexpr char AccQual[]
Key for Kernel::Arg::Metadata::mAccQual.
constexpr char IsConst[]
Key for Kernel::Arg::Metadata::mIsConst.
constexpr char WorkGroupSizeHint[]
Key for Kernel::Attr::Metadata::mWorkGroupSizeHint.
constexpr char WavefrontPrivateSegmentOffsetSGPR[]
Key for Kernel::DebugProps::Metadata::mWavefrontPrivateSegmentOffsetSGPR.
constexpr char ReservedNumVGPRs[]
Key for Kernel::DebugProps::Metadata::mReservedNumVGPRs.
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
constexpr uint32_t VersionMajor
HSA metadata major version.
std::vector< uint32_t > Metadata
PAL metadata represented as a vector.