HomePhabricator

[AMDGPU] Fix +DumpCode to print an entry label for the first function

Authored by foad on Jun 27 2019, 1:19 AM.

Description

[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

llvm-svn: 364508

Details

Committed
foadJun 27 2019, 1:19 AM
Reviewer
arsenm
Differential Revision
D63712: [AMDGPU] Fix +DumpCode to print an entry label for the first function
Parents
rG7b81b6136869: Silence gcc warning after r364458
Branches
Unknown
Tags
Unknown