LLVM: lib/Support/AMDGPUMetadata.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

17#include

18

21

24

25namespace llvm {

26namespace yaml {

27

28template <>

37

38template <>

49

50template <>

67 YIO.enumCase(EN, "HiddenCompletionAction",

69 YIO.enumCase(EN, "HiddenMultiGridSyncArg",

71 }

72};

73

74template <>

77 YIO.enumCase(EN, "Struct", ValueType::Struct);

78 YIO.enumCase(EN, "I8", ValueType::I8);

79 YIO.enumCase(EN, "U8", ValueType::U8);

80 YIO.enumCase(EN, "I16", ValueType::I16);

81 YIO.enumCase(EN, "U16", ValueType::U16);

82 YIO.enumCase(EN, "F16", ValueType::F16);

83 YIO.enumCase(EN, "I32", ValueType::I32);

84 YIO.enumCase(EN, "U32", ValueType::U32);

85 YIO.enumCase(EN, "F32", ValueType::F32);

86 YIO.enumCase(EN, "I64", ValueType::I64);

87 YIO.enumCase(EN, "U64", ValueType::U64);

88 YIO.enumCase(EN, "F64", ValueType::F64);

89 }

90};

91

92template <>

102 std::string());

103 }

104};

105

106template <>

114

115

116 std::optional Unused;

118

131 }

132};

133

134template <>

163

164template <>

179

180template <>

187 std::vector<uint32_t>());

196 }

197};

198

199template <>

208

209}

210

213

216 YamlInput >> HSAMetadata;

217 return YamlInput.error();

218}

219

222 yaml::Output YamlOutput(YamlStream, nullptr, std::numeric_limits::max());

223 YamlOutput << HSAMetadata;

224 return std::error_code();

225}

226

227}

228}

229}

#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)

Utility for declaring that a std::vector of a particular type should be considered a YAML sequence.

StringRef - Represent a constant reference to a string, i.e.

A raw_ostream that writes to an std::string.

virtual bool outputting() const =0

void enumCase(T &Val, StringRef Str, const T ConstVal)

void mapOptional(StringRef Key, T &Val)

void mapRequired(StringRef Key, T &Val)

The Input class is used to parse a yaml document into in-memory structs and vectors.

std::error_code error() override

The Output class is used to generate a yaml document from in-memory structs and vectors.

constexpr char AddrSpaceQual[]

Key for Kernel::Arg::Metadata::mAddrSpaceQual.

constexpr char ValueType[]

Key for Kernel::Arg::Metadata::mValueType. (deprecated)

constexpr char IsVolatile[]

Key for Kernel::Arg::Metadata::mIsVolatile.

constexpr char PointeeAlign[]

Key for Kernel::Arg::Metadata::mPointeeAlign.

constexpr char Size[]

Key for Kernel::Arg::Metadata::mSize.

constexpr char Align[]

Key for Kernel::Arg::Metadata::mAlign.

constexpr char TypeName[]

Key for Kernel::Arg::Metadata::mTypeName.

constexpr char ValueKind[]

Key for Kernel::Arg::Metadata::mValueKind.

constexpr char IsConst[]

Key for Kernel::Arg::Metadata::mIsConst.

constexpr char IsRestrict[]

Key for Kernel::Arg::Metadata::mIsRestrict.

constexpr char ActualAccQual[]

Key for Kernel::Arg::Metadata::mActualAccQual.

constexpr char AccQual[]

Key for Kernel::Arg::Metadata::mAccQual.

constexpr char IsPipe[]

Key for Kernel::Arg::Metadata::mIsPipe.

constexpr char Name[]

Key for Kernel::Arg::Metadata::mName.

constexpr char ReqdWorkGroupSize[]

Key for Kernel::Attr::Metadata::mReqdWorkGroupSize.

constexpr char VecTypeHint[]

Key for Kernel::Attr::Metadata::mVecTypeHint.

constexpr char RuntimeHandle[]

Key for Kernel::Attr::Metadata::mRuntimeHandle.

constexpr char WorkGroupSizeHint[]

Key for Kernel::Attr::Metadata::mWorkGroupSizeHint.

constexpr char NumVGPRs[]

Key for Kernel::CodeProps::Metadata::mNumVGPRs.

constexpr char NumSpilledSGPRs[]

Key for Kernel::CodeProps::Metadata::mNumSpilledSGPRs.

constexpr char IsXNACKEnabled[]

Key for Kernel::CodeProps::Metadata::mIsXNACKEnabled.

constexpr char NumSpilledVGPRs[]

Key for Kernel::CodeProps::Metadata::mNumSpilledVGPRs.

constexpr char KernargSegmentAlign[]

Key for Kernel::CodeProps::Metadata::mKernargSegmentAlign.

constexpr char IsDynamicCallStack[]

Key for Kernel::CodeProps::Metadata::mIsDynamicCallStack.

constexpr char NumSGPRs[]

Key for Kernel::CodeProps::Metadata::mNumSGPRs.

constexpr char KernargSegmentSize[]

Key for Kernel::CodeProps::Metadata::mKernargSegmentSize.

constexpr char WavefrontSize[]

Key for Kernel::CodeProps::Metadata::mWavefrontSize.

constexpr char MaxFlatWorkGroupSize[]

Key for Kernel::CodeProps::Metadata::mMaxFlatWorkGroupSize.

constexpr char GroupSegmentFixedSize[]

Key for Kernel::CodeProps::Metadata::mGroupSegmentFixedSize.

constexpr char PrivateSegmentFixedSize[]

Key for Kernel::CodeProps::Metadata::mPrivateSegmentFixedSize.

constexpr char ReservedFirstVGPR[]

Key for Kernel::DebugProps::Metadata::mReservedFirstVGPR.

constexpr char ReservedNumVGPRs[]

Key for Kernel::DebugProps::Metadata::mReservedNumVGPRs.

constexpr char DebuggerABIVersion[]

Key for Kernel::DebugProps::Metadata::mDebuggerABIVersion.

constexpr char PrivateSegmentBufferSGPR[]

Key for Kernel::DebugProps::Metadata::mPrivateSegmentBufferSGPR.

constexpr char WavefrontPrivateSegmentOffsetSGPR[]

Key for Kernel::DebugProps::Metadata::mWavefrontPrivateSegmentOffsetSGPR.

constexpr char Args[]

Key for Kernel::Metadata::mArgs.

constexpr char CodeProps[]

Key for Kernel::Metadata::mCodeProps.

constexpr char Name[]

Key for Kernel::Metadata::mName.

constexpr char Language[]

Key for Kernel::Metadata::mLanguage.

constexpr char Attrs[]

Key for Kernel::Metadata::mAttrs.

constexpr char LanguageVersion[]

Key for Kernel::Metadata::mLanguageVersion.

constexpr char DebugProps[]

Key for Kernel::Metadata::mDebugProps.

constexpr char SymbolName[]

Key for Kernel::Metadata::mSymbolName.

constexpr char Version[]

Key for HSA::Metadata::mVersion.

constexpr char Printf[]

Key for HSA::Metadata::mPrintf.

constexpr char Kernels[]

Key for HSA::Metadata::mKernels.

LLVM_ABI std::error_code fromString(StringRef String, Metadata &HSAMetadata)

Converts String to HSAMetadata.

Definition AMDGPUMetadata.cpp:214

AddressSpaceQualifier

Address space qualifiers.

LLVM_ABI std::error_code toString(Metadata HSAMetadata, std::string &String)

Converts HSAMetadata to String.

Definition AMDGPUMetadata.cpp:220

AccessQualifier

Access qualifiers.

This is an optimization pass for GlobalISel generic memory operations.

PointerUnion< const Value *, const PseudoSourceValue * > ValueType

This class should be specialized by any type that needs to be converted to/from a YAML mapping.

static void enumeration(IO &YIO, AccessQualifier &EN)

Definition AMDGPUMetadata.cpp:30

static void enumeration(IO &YIO, AddressSpaceQualifier &EN)

Definition AMDGPUMetadata.cpp:40

static void enumeration(IO &YIO, ValueKind &EN)

Definition AMDGPUMetadata.cpp:52

static void enumeration(IO &YIO, ValueType &EN)

Definition AMDGPUMetadata.cpp:76

This class should be specialized by any integral type that converts to/from a YAML scalar where there...