AMDGPU: Include LDS size in printed comment

llvm-svn: 266382
This commit is contained in:
Matt Arsenault 2016-04-14 22:11:51 +00:00
parent 80e3983b83
commit 18048c7ee0
2 changed files with 12 additions and 4 deletions

View File

@ -232,6 +232,8 @@ bool AMDGPUAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
false);
OutStreamer->emitRawComment(" ScratchSize: " + Twine(KernelInfo.ScratchSize),
false);
OutStreamer->emitRawComment(" LDSByteSize: " + Twine(KernelInfo.LDSSize) +
" bytes/workgroup (compile time only)", false);
OutStreamer->emitRawComment(" COMPUTE_PGM_RSRC2:USER_SGPR: " +
Twine(G_00B84C_USER_SGPR(KernelInfo.ComputePGMRSrc2)),

View File

@ -1,11 +1,17 @@
; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s
; RUN: llc -march=amdgcn < %s | FileCheck -check-prefix=ALL -check-prefix=GCN %s
; RUN: llc -march=r600 -mcpu=redwood < %s | FileCheck -check-prefix=ALL -check-prefix=EG %s
; This test makes sure we do not double count global values when they are
; used in different basic blocks.
; CHECK: .long 166120
; CHECK-NEXT: .long 1
; CHECK-LABEL: {{^}}test:
; GCN: .long 47180
; GCN-NEXT: .long 32900
; EG: .long 166120
; EG-NEXT: .long 1
; ALL: {{^}}test:
; GCN: ; LDSByteSize: 4 bytes/workgroup (compile time only)
@lds = internal unnamed_addr addrspace(3) global i32 undef, align 4
define void @test(i32 addrspace(1)* %out, i32 %cond) {