[PATCH] D27732: [AMDGPU] Do not emit .AMDGPU.config section for amdhsa
Konstantin Zhuravlyov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 09:13:09 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL291245: [AMDGPU] Do not emit .AMDGPU.config section for amdhsa (authored by kzhuravl).
Changed prior to commit:
https://reviews.llvm.org/D27732?vs=81301&id=83373#toc
Repository:
rL LLVM
https://reviews.llvm.org/D27732
Files:
llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
llvm/trunk/test/CodeGen/AMDGPU/hsa-func.ll
llvm/trunk/test/CodeGen/AMDGPU/hsa.ll
Index: llvm/trunk/test/CodeGen/AMDGPU/hsa.ll
===================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/hsa.ll
+++ llvm/trunk/test/CodeGen/AMDGPU/hsa.ll
@@ -34,12 +34,12 @@
; ELF: Type: AMDGPU_HSA_KERNEL (0xA)
; ELF: }
+; HSA-NOT: .AMDGPU.config
+; HSA: .text
; HSA: .hsa_code_object_version 2,1
; HSA-CI: .hsa_code_object_isa 7,0,0,"AMD","AMDGPU"
; HSA-VI: .hsa_code_object_isa 8,0,1,"AMD","AMDGPU"
-; HSA: .text
-
; HSA: .amdgpu_hsa_kernel simple
; HSA: {{^}}simple:
; HSA: .amd_kernel_code_t
Index: llvm/trunk/test/CodeGen/AMDGPU/hsa-func.ll
===================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/hsa-func.ll
+++ llvm/trunk/test/CodeGen/AMDGPU/hsa-func.ll
@@ -30,12 +30,11 @@
; ELF: Type: Function (0x2)
; ELF: }
+; HSA: .text
; HSA: .hsa_code_object_version 2,1
; HSA-CI: .hsa_code_object_isa 7,0,0,"AMD","AMDGPU"
; HSA-VI: .hsa_code_object_isa 8,0,1,"AMD","AMDGPU"
-; HSA: .text
-
; HSA-NOT: .amdgpu_hsa_kernel simple
; HSA: {{^}}simple:
; HSA: .amd_kernel_code_t
Index: llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
@@ -176,12 +176,14 @@
SetupMachineFunction(MF);
+ const AMDGPUSubtarget &STM = MF.getSubtarget<AMDGPUSubtarget>();
MCContext &Context = getObjFileLowering().getContext();
- MCSectionELF *ConfigSection =
- Context.getELFSection(".AMDGPU.config", ELF::SHT_PROGBITS, 0);
- OutStreamer->SwitchSection(ConfigSection);
+ if (!STM.isAmdHsaOS()) {
+ MCSectionELF *ConfigSection =
+ Context.getELFSection(".AMDGPU.config", ELF::SHT_PROGBITS, 0);
+ OutStreamer->SwitchSection(ConfigSection);
+ }
- const AMDGPUSubtarget &STM = MF.getSubtarget<AMDGPUSubtarget>();
SIProgramInfo KernelInfo;
if (STM.getGeneration() >= AMDGPUSubtarget::SOUTHERN_ISLANDS) {
getSIProgramInfo(KernelInfo, MF);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27732.83373.patch
Type: text/x-patch
Size: 2042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170106/1baf01e6/attachment.bin>
More information about the llvm-commits
mailing list