[PATCH] D63712: [AMDGPU] Fix +DumpCode to print an entry label for the first function
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 27 01:19:48 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL364508: [AMDGPU] Fix +DumpCode to print an entry label for the first function (authored by foad, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63712/new/
https://reviews.llvm.org/D63712
Files:
llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
llvm/trunk/test/CodeGen/AMDGPU/debug.ll
Index: llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
@@ -206,18 +206,6 @@
if (STM.isAmdHsaOS())
HSAMetadataStream->emitKernel(*MF, CurrentProgramInfo);
-
- DumpCodeInstEmitter = nullptr;
- if (STM.dumpCode()) {
- // For -dumpcode, get the assembler out of the streamer, even if it does
- // not really want to let us have it. This only works with -filetype=obj.
- bool SaveFlag = OutStreamer->getUseAssemblerInfoForParsing();
- OutStreamer->setUseAssemblerInfoForParsing(true);
- MCAssembler *Assembler = OutStreamer->getAssemblerPtr();
- OutStreamer->setUseAssemblerInfoForParsing(SaveFlag);
- if (Assembler)
- DumpCodeInstEmitter = Assembler->getEmitterPtr();
- }
}
void AMDGPUAsmPrinter::EmitFunctionBodyEnd() {
@@ -458,6 +446,18 @@
EmitProgramInfoSI(MF, CurrentProgramInfo);
}
+ DumpCodeInstEmitter = nullptr;
+ if (STM.dumpCode()) {
+ // For -dumpcode, get the assembler out of the streamer, even if it does
+ // not really want to let us have it. This only works with -filetype=obj.
+ bool SaveFlag = OutStreamer->getUseAssemblerInfoForParsing();
+ OutStreamer->setUseAssemblerInfoForParsing(true);
+ MCAssembler *Assembler = OutStreamer->getAssemblerPtr();
+ OutStreamer->setUseAssemblerInfoForParsing(SaveFlag);
+ if (Assembler)
+ DumpCodeInstEmitter = Assembler->getEmitterPtr();
+ }
+
DisasmLines.clear();
HexLines.clear();
DisasmLineMaxLen = 0;
Index: llvm/trunk/test/CodeGen/AMDGPU/debug.ll
===================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/debug.ll
+++ llvm/trunk/test/CodeGen/AMDGPU/debug.ll
@@ -3,6 +3,8 @@
; Test for a crash in the custom assembly dump code.
+; SI: test:
+; SI: BB0_0:
; SI: s_endpgm
define amdgpu_kernel void @test(i32 addrspace(1)* %out) {
store i32 0, i32 addrspace(1)* %out
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63712.206793.patch
Type: text/x-patch
Size: 2045 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190627/125aa535/attachment.bin>
More information about the llvm-commits
mailing list