]> granicus.if.org Git - llvm/commit
[AMDGPU] Fix +DumpCode to print an entry label for the first function
authorJay Foad <jay.foad@gmail.com>
Thu, 27 Jun 2019 08:19:28 +0000 (08:19 +0000)
committerJay Foad <jay.foad@gmail.com>
Thu, 27 Jun 2019 08:19:28 +0000 (08:19 +0000)
commit135f7bd0843bac2b78a70a41b1f5326375fa9c9c
tree82b3a0368d8f923ea22a2a1dec752ec2c696f24d
parentc7d457321d7d124c0083c6f7ebec0bf96f048caa
[AMDGPU] Fix +DumpCode to print an entry label for the first function

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

It tries to print an entry label at the start of every function, but
that didn't work for the first function in the module because
DumpCodeInstEmitter wasn't initialised until EmitFunctionBodyStart
which is too late.

Change-Id: I790d73ddf4f51fd02ab32529380c7cb7c607c4ee

Reviewers: arsenm, tpr, kzhuravl

Reviewed By: arsenm

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364508 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
test/CodeGen/AMDGPU/debug.ll