[PATCH] D37753: [AMDGPU] implemented pal metadata

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 12 11:34:56 PDT 2017


tpr created this revision.
Herald added subscribers: t-tye, yaxunl, wdng, kzhuravl.

For the amdpal OS type:

We write an AMDGPU_PAL_METADATA record in the .note section in the ELF
(or as an assembler directive). It contains key=value pairs of 32 bit
ints. It is a merge of metadata from codegen of the shaders, and
metadata provided by the frontend as _amdgpu_pal_metadata IR metadata.
Where both sources have a key=value with the same key, the two values
are ORed together.

We also write an AMDGPU_PAL_CODE_OBJECT_VERSION .note record, containing
a single 32 bit int giving the minor PAL ABI version, and an
AMDGPU_HSA_ISA .note record, same as used in HSA.

These .note records are part of the amdpal ABI and will be documented in
docs/AMDGPUUsage.rst in a future commit.

Eventually the amdpal OS type will stop generating the .AMDGPU.config
section once the frontend has safely moved over to using the .note
records above instead of .AMDGPU.config.


https://reviews.llvm.org/D37753

Files:
  lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
  lib/Target/AMDGPU/AMDGPUAsmPrinter.h
  lib/Target/AMDGPU/AMDGPUPTNote.h
  lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
  lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp
  lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h
  test/CodeGen/AMDGPU/amdpal-cs.ll
  test/CodeGen/AMDGPU/amdpal-es.ll
  test/CodeGen/AMDGPU/amdpal-gs.ll
  test/CodeGen/AMDGPU/amdpal-hs.ll
  test/CodeGen/AMDGPU/amdpal-ls.ll
  test/CodeGen/AMDGPU/amdpal-ps.ll
  test/CodeGen/AMDGPU/amdpal-vs.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37753.114872.patch
Type: text/x-patch
Size: 20695 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170912/de4ee112/attachment.bin>


More information about the llvm-commits mailing list