[PATCH] D31258: [AMDGPU] Fix bug 31610

Konstantin Zhuravlyov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 22 15:00:41 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL298551: [AMDGPU] Fix bug 31610 (authored by kzhuravl).

Changed prior to commit:
  https://reviews.llvm.org/D31258?vs=92699&id=92720#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D31258

Files:
  llvm/trunk/lib/Target/AMDGPU/AMDGPURuntimeMetadata.h
  llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPURuntimeMD.cpp


Index: llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPURuntimeMD.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPURuntimeMD.cpp
+++ llvm/trunk/lib/Target/AMDGPU/MCTargetDesc/AMDGPURuntimeMD.cpp
@@ -49,7 +49,6 @@
 CheckRuntimeMDParser("amdgpu-check-rtmd-parser", cl::Hidden,
                      cl::desc("Check AMDGPU runtime metadata YAML parser"));
 
-LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(uint8_t)
 LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(uint32_t)
 LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(std::string)
 LLVM_YAML_IS_SEQUENCE_VECTOR(Kernel::Metadata)
@@ -297,9 +296,9 @@
       auto Node = MD->getOperand(0);
       if (Node->getNumOperands() > 1) {
         Kernel.Language = "OpenCL C";
-        uint16_t Major = mdconst::extract<ConstantInt>(Node->getOperand(0))
+        uint32_t Major = mdconst::extract<ConstantInt>(Node->getOperand(0))
                          ->getZExtValue();
-        uint16_t Minor = mdconst::extract<ConstantInt>(Node->getOperand(1))
+        uint32_t Minor = mdconst::extract<ConstantInt>(Node->getOperand(1))
                          ->getZExtValue();
         Kernel.LanguageVersion.push_back(Major);
         Kernel.LanguageVersion.push_back(Minor);
Index: llvm/trunk/lib/Target/AMDGPU/AMDGPURuntimeMetadata.h
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPURuntimeMetadata.h
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPURuntimeMetadata.h
@@ -40,8 +40,8 @@
 namespace RuntimeMD {
 
   // Version and revision of runtime metadata
-  const unsigned char MDVersion   = 2;
-  const unsigned char MDRevision  = 1;
+  const uint32_t MDVersion   = 2;
+  const uint32_t MDRevision  = 1;
 
   // Name of keys for runtime metadata.
   namespace KeyName {
@@ -215,7 +215,7 @@
     struct Metadata {
       std::string Name;
       std::string Language;
-      std::vector<uint8_t> LanguageVersion;
+      std::vector<uint32_t> LanguageVersion;
       std::vector<uint32_t> ReqdWorkGroupSize;
       std::vector<uint32_t> WorkGroupSizeHint;
       std::string VecTypeHint;
@@ -265,7 +265,7 @@
 
     // In-memory representation of program information.
     struct Metadata {
-      std::vector<uint8_t> MDVersionSeq;
+      std::vector<uint32_t> MDVersionSeq;
       IsaInfo::Metadata IsaInfo;
       std::vector<std::string> PrintfInfo;
       std::vector<Kernel::Metadata> Kernels;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31258.92720.patch
Type: text/x-patch
Size: 2423 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170322/ae71dd38/attachment.bin>


More information about the llvm-commits mailing list