Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit e7bfbb7

Browse files
committed
Merging r298551:
------------------------------------------------------------------------ r298551 | kzhuravl | 2017-03-22 17:48:18 -0400 (Wed, 22 Mar 2017) | 4 lines [AMDGPU] Fix bug 31610 Differential Revision: https://reviews.llvm.org/D31258 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_40@299441 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 0a5d4e4 commit e7bfbb7

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

lib/Target/AMDGPU/AMDGPURuntimeMetadata.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ namespace AMDGPU {
4141
namespace RuntimeMD {
4242

4343
// Version and revision of runtime metadata
44-
const unsigned char MDVersion = 2;
45-
const unsigned char MDRevision = 0;
44+
const uint32_t MDVersion = 2;
45+
const uint32_t MDRevision = 0;
4646

4747
// Name of keys for runtime metadata.
4848
namespace KeyName {
@@ -157,7 +157,7 @@ namespace RuntimeMD {
157157
struct Metadata {
158158
std::string Name;
159159
std::string Language;
160-
std::vector<uint8_t> LanguageVersion;
160+
std::vector<uint32_t> LanguageVersion;
161161
std::vector<uint32_t> ReqdWorkGroupSize;
162162
std::vector<uint32_t> WorkGroupSizeHint;
163163
std::string VecTypeHint;
@@ -171,7 +171,7 @@ namespace RuntimeMD {
171171
namespace Program {
172172
// In-memory representation of program information.
173173
struct Metadata {
174-
std::vector<uint8_t> MDVersionSeq;
174+
std::vector<uint32_t> MDVersionSeq;
175175
std::vector<std::string> PrintfInfo;
176176
std::vector<Kernel::Metadata> Kernels;
177177

lib/Target/AMDGPU/MCTargetDesc/AMDGPURuntimeMD.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ static cl::opt<bool>
3838
CheckRuntimeMDParser("amdgpu-check-rtmd-parser", cl::Hidden,
3939
cl::desc("Check AMDGPU runtime metadata YAML parser"));
4040

41-
LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(uint8_t)
4241
LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(uint32_t)
4342
LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(std::string)
4443
LLVM_YAML_IS_SEQUENCE_VECTOR(Kernel::Metadata)
@@ -266,9 +265,9 @@ static Kernel::Metadata getRuntimeMDForKernel(const Function &F) {
266265
auto Node = MD->getOperand(0);
267266
if (Node->getNumOperands() > 1) {
268267
Kernel.Language = "OpenCL C";
269-
uint16_t Major = mdconst::extract<ConstantInt>(Node->getOperand(0))
268+
uint32_t Major = mdconst::extract<ConstantInt>(Node->getOperand(0))
270269
->getZExtValue();
271-
uint16_t Minor = mdconst::extract<ConstantInt>(Node->getOperand(1))
270+
uint32_t Minor = mdconst::extract<ConstantInt>(Node->getOperand(1))
272271
->getZExtValue();
273272
Kernel.LanguageVersion.push_back(Major);
274273
Kernel.LanguageVersion.push_back(Minor);

0 commit comments

Comments
 (0)