[llvm] r293083 - [AMDGPU] Bump up n_type for metadata v2

Konstantin Zhuravlyov via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 12:47:18 PST 2017


Author: kzhuravl
Date: Wed Jan 25 14:47:17 2017
New Revision: 293083

URL: http://llvm.org/viewvc/llvm-project?rev=293083&view=rev
Log:
[AMDGPU] Bump up n_type for metadata v2

Differential Revision: https://reviews.llvm.org/D29115

Modified:
    llvm/trunk/lib/Target/AMDGPU/AMDGPUPTNote.h
    llvm/trunk/tools/llvm-readobj/ELFDumper.cpp

Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUPTNote.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUPTNote.h?rev=293083&r1=293082&r2=293083&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUPTNote.h (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUPTNote.h Wed Jan 25 14:47:17 2017
@@ -25,6 +25,7 @@ const char SectionName[] = ".note";
 
 const char NoteName[] = "AMD";
 
+// TODO: Move this enum to include/llvm/Support so it can be used in tools?
 enum NoteType{
     NT_AMDGPU_HSA_CODE_OBJECT_VERSION = 1,
     NT_AMDGPU_HSA_HSAIL = 2,
@@ -32,7 +33,9 @@ enum NoteType{
     NT_AMDGPU_HSA_PRODUCER = 4,
     NT_AMDGPU_HSA_PRODUCER_OPTIONS = 5,
     NT_AMDGPU_HSA_EXTENSION = 6,
-    NT_AMDGPU_HSA_RUNTIME_METADATA = 7,
+    NT_AMDGPU_HSA_RUNTIME_METADATA_V_1 = 7, // deprecated since 12/14/16.
+    NT_AMDGPU_HSA_RUNTIME_METADATA_V_2 = 8,
+    NT_AMDGPU_HSA_RUNTIME_METADATA = NT_AMDGPU_HSA_RUNTIME_METADATA_V_2,
     NT_AMDGPU_HSA_HLDEBUG_DEBUG = 101,
     NT_AMDGPU_HSA_HLDEBUG_TARGET = 102
 };

Modified: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/ELFDumper.cpp?rev=293083&r1=293082&r2=293083&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp Wed Jan 25 14:47:17 2017
@@ -2364,7 +2364,7 @@ template <class ELFT> void ELFDumper<ELF
   }
   ArrayRef<uint8_t> Sec = unwrapOrError(Obj->getSectionContents(Shdr));
 
-  const uint32_t RuntimeMDNoteType = 7;
+  const uint32_t RuntimeMDNoteType = 8;
   for (auto I = reinterpret_cast<const Elf_Word *>(&Sec[0]),
        E = I + Sec.size()/4; I != E;) {
     uint32_t NameSZ = I[0];




More information about the llvm-commits mailing list