[llvm] r266382 - AMDGPU: Include LDS size in printed comment
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 14 15:11:51 PDT 2016
Author: arsenm
Date: Thu Apr 14 17:11:51 2016
New Revision: 266382
URL: http://llvm.org/viewvc/llvm-project?rev=266382&view=rev
Log:
AMDGPU: Include LDS size in printed comment
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
llvm/trunk/test/CodeGen/AMDGPU/lds-size.ll
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp?rev=266382&r1=266381&r2=266382&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp Thu Apr 14 17:11:51 2016
@@ -232,6 +232,8 @@ bool AMDGPUAsmPrinter::runOnMachineFunct
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)),
Modified: llvm/trunk/test/CodeGen/AMDGPU/lds-size.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AMDGPU/lds-size.ll?rev=266382&r1=266381&r2=266382&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AMDGPU/lds-size.ll (original)
+++ llvm/trunk/test/CodeGen/AMDGPU/lds-size.ll Thu Apr 14 17:11:51 2016
@@ -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) {
More information about the llvm-commits
mailing list