-
Notifications
You must be signed in to change notification settings - Fork 13.7k
[AMDGPU] NFC: Add helper to query archVGPR #102690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Change-Id: Ie7d10498c0b1bb2d00a54fa17fd978752a9f1d52
@llvm/pr-subscribers-backend-amdgpu Author: Jeffrey Byrnes (jrbyrnes) ChangesFor any users that is interested in just the ArchVGPR count (without comparing to AGPR count) Full diff: https://github.com/llvm/llvm-project/pull/102690.diff 1 Files Affected:
diff --git a/llvm/lib/Target/AMDGPU/GCNRegPressure.h b/llvm/lib/Target/AMDGPU/GCNRegPressure.h
index 98f9b3bc6aada..08102a3524a7a 100644
--- a/llvm/lib/Target/AMDGPU/GCNRegPressure.h
+++ b/llvm/lib/Target/AMDGPU/GCNRegPressure.h
@@ -54,6 +54,8 @@ struct GCNRegPressure {
}
return std::max(Value[VGPR32], Value[AGPR32]);
}
+ unsigned getArchVGPRNum() const { return Value[VGPR32];}
+
unsigned getAGPRNum() const { return Value[AGPR32]; }
unsigned getVGPRTuplesWeight() const { return std::max(Value[VGPR_TUPLE],
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
Where is the use of it? |
For intended use, see https://github.com/llvm/llvm-project/pull/93090/files -- changes to llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp :: getRegisterPressures I have not yet used getArchVGPRNum there, but I am working on putting together a body of work for that PR. In this function, we copy over the GCNRegisterPressure into the Pressure vector. Pressure[AMDGPU::RegisterPressureSets::VGPR_32] should be the archVGPR pressure, but GCNRegisterPressure interface only has getVGPRNum which aggregates the archVGPR + AGPR pressure |
@@ -54,6 +54,8 @@ struct GCNRegPressure { | |||
} | |||
return std::max(Value[VGPR32], Value[AGPR32]); | |||
} | |||
unsigned getArchVGPRNum() const { return Value[VGPR32];} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should get comments? Also could just fold this into the usage PR
8339cb5
to
8c93248
Compare
For any users that is interested in just the ArchVGPR count (without comparing to AGPR count)
For any users that is interested in just the ArchVGPR count (without comparing to AGPR count)
For any users that is interested in just the ArchVGPR count (without comparing to AGPR count)
For any users that is interested in just the ArchVGPR count (without comparing to AGPR count) (cherry picked from commit 825dbbb) Change-Id: I16c4ef3cdcd12ceb8d4f7ed8a72722e5cb3b49ba
For any users that is interested in just the ArchVGPR count (without comparing to AGPR count)