]> granicus.if.org Git - llvm/commit
[AMDGPU] Fixed +DumpCode
authorTim Renouf <tpr.llvm@botech.co.uk>
Tue, 14 May 2019 16:17:14 +0000 (16:17 +0000)
committerTim Renouf <tpr.llvm@botech.co.uk>
Tue, 14 May 2019 16:17:14 +0000 (16:17 +0000)
commit0fcb9192e4bdcdd40cb3eb9d80887dd6313283c8
tree723c86323e57c645c6c5501f956b9bd407f2e256
parent07a736b7ffc680eeb5708dbdf285d6882e8cd154
[AMDGPU] Fixed +DumpCode

The +DumpCode attribute is a horrible hack in AMDGPU to embed the
disassembly of the generated code into the elf file. It is used by LLPC
to implement an extension that allows the application to read back the
disassembly of the code. Longer term, we should re-implement that by
using the LLVM disassembler from the Vulkan driver.

Recent LLVM changes broke +DumpCode. With -filetype=asm it crashed, and
with -filetype=obj I think it did not include any instructions, only the
labels. Fixed with this commit: now it has no effect with -filetype=asm,
and works as intended with -filetype=obj.

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

Change-Id: I6436d86fe2ea220d74a643a85e64753747c9366b

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360688 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
lib/Target/AMDGPU/AMDGPUAsmPrinter.h
lib/Target/AMDGPU/AMDGPUMCInstLower.cpp