[PATCH] D60682: [AMDGPU] Fixed +DumpCode

Tim Renouf via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 15 03:17:21 PDT 2019


tpr created this revision.
Herald added subscribers: llvm-commits, t-tye, dstuttard, yaxunl, nhaehnle, wdng, jvesely, kzhuravl, arsenm.
Herald added a project: LLVM.

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.

Change-Id: I6436d86fe2ea220d74a643a85e64753747c9366b


Repository:
  rL LLVM

https://reviews.llvm.org/D60682

Files:
  lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
  lib/Target/AMDGPU/AMDGPUAsmPrinter.h
  lib/Target/AMDGPU/AMDGPUMCInstLower.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60682.195121.patch
Type: text/x-patch
Size: 4406 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190415/0c41837f/attachment.bin>


More information about the llvm-commits mailing list