Skip to content

Commit 8c93248

Browse files
committed
Comments
Change-Id: I4d7cc3128724afa4bb6c19468d1b04f9a7b2e886
1 parent 51d8ce4 commit 8c93248

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

llvm/lib/Target/AMDGPU/GCNRegPressure.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,20 @@ struct GCNRegPressure {
4646

4747
void clear() { std::fill(&Value[0], &Value[TOTAL_KINDS], 0); }
4848

49+
/// \returns the SGPR32 pressure
4950
unsigned getSGPRNum() const { return Value[SGPR32]; }
51+
/// \returns the aggregated ArchVGPR32, AccVGPR32 pressure dependent upon \p
52+
/// UnifiedVGPRFile
5053
unsigned getVGPRNum(bool UnifiedVGPRFile) const {
5154
if (UnifiedVGPRFile) {
5255
return Value[AGPR32] ? alignTo(Value[VGPR32], 4) + Value[AGPR32]
5356
: Value[VGPR32] + Value[AGPR32];
5457
}
5558
return std::max(Value[VGPR32], Value[AGPR32]);
5659
}
57-
unsigned getArchVGPRNum() const { return Value[VGPR32];}
58-
60+
/// \returns the ArchVGPR32 pressure
61+
unsigned getArchVGPRNum() const { return Value[VGPR32]; }
62+
/// \returns the AccVGPR32 pressure
5963
unsigned getAGPRNum() const { return Value[AGPR32]; }
6064

6165
unsigned getVGPRTuplesWeight() const { return std::max(Value[VGPR_TUPLE],

0 commit comments

Comments
 (0)