[PATCH] D29115: [AMDGPU] Bump up n_type for metadata v2

Konstantin Zhuravlyov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 25 09:44:35 PST 2017


kzhuravl updated this revision to Diff 85770.
kzhuravl added a comment.

Add a todo for possibly moving n_type into include/llvm/Support


https://reviews.llvm.org/D29115

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


Index: tools/llvm-readobj/ELFDumper.cpp
===================================================================
--- tools/llvm-readobj/ELFDumper.cpp
+++ tools/llvm-readobj/ELFDumper.cpp
@@ -2364,7 +2364,7 @@
   }
   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];
Index: lib/Target/AMDGPU/AMDGPUPTNote.h
===================================================================
--- lib/Target/AMDGPU/AMDGPUPTNote.h
+++ lib/Target/AMDGPU/AMDGPUPTNote.h
@@ -25,14 +25,17 @@
 
 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,
     NT_AMDGPU_HSA_ISA = 3,
     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
 };


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29115.85770.patch
Type: text/x-patch
Size: 1358 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170125/c53eb125/attachment.bin>


More information about the llvm-commits mailing list