summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
diff options
context:
space:
mode:
authorMarek Olsak <marek.olsak@amd.com>2016-07-13 17:35:15 +0000
committerMarek Olsak <marek.olsak@amd.com>2016-07-13 17:35:15 +0000
commit0532c190f7b0a8c33fdc20485c23815e2321bd16 (patch)
treefe55f36ca26b2aecdc9b0ea7172f35ceabacf5da /llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
parent1852a784161c6a61ff1446e267c5e459f2c2a268 (diff)
downloadbcm5719-llvm-0532c190f7b0a8c33fdc20485c23815e2321bd16.tar.gz
bcm5719-llvm-0532c190f7b0a8c33fdc20485c23815e2321bd16.zip
AMDGPU/SI: Emit the number of SGPR and VGPR spills
Summary: v2: don't count SGPRs spilled to scratch twice I think this is sufficient. It doesn't count private memory usage, which happens often and uses scratch but isn't technically a spill. The private memory usage can be computed by: [scratch_per_thread - vgpr_spills - a random multiple of SGPR spills]. The fact SGPR spills add very high numbers to the scratch size make that computation a guessing game, but I don't have a solution to that. Reviewers: tstellarAMD Subscribers: arsenm, kzhuravl Differential Revision: http://reviews.llvm.org/D22197 llvm-svn: 275288
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
index 2c478d5213e..4d12a1ef9a9 100644
--- a/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
@@ -63,6 +63,8 @@ SIMachineFunctionInfo::SIMachineFunctionInfo(const MachineFunction &MF)
HasSpilledVGPRs(false),
HasNonSpillStackObjects(false),
HasFlatInstructions(false),
+ NumSpilledSGPRs(0),
+ NumSpilledVGPRs(0),
PrivateSegmentBuffer(false),
DispatchPtr(false),
QueuePtr(false),
OpenPOWER on IntegriCloud