]> granicus.if.org Git - llvm/commit
[AMDGPU] implemented pal metadata
authorTim Renouf <tpr.llvm@botech.co.uk>
Tue, 3 Oct 2017 19:03:52 +0000 (19:03 +0000)
committerTim Renouf <tpr.llvm@botech.co.uk>
Tue, 3 Oct 2017 19:03:52 +0000 (19:03 +0000)
commit924d87d4be656bb63147a5e06d4061cc4fda5722
treee2dd4b5378e071187fed434730cf8d7bcf931ee6
parent673f1ddc20899ae591ad3fb9c151ef538ef898e9
[AMDGPU] implemented pal metadata

Summary:
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.

This .note record is 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.

Reviewers: arsenm, nhaehnle, dstuttard

Subscribers: kzhuravl, wdng, yaxunl, llvm-commits, t-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314829 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
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
test/MC/AMDGPU/pal.s [new file with mode: 0644]