[llvm] [AMDGPU] Rename getNumVGPRBlocks. NFC (PR #84161)
Diana Picus via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 7 00:41:52 PST 2024
================
@@ -1158,14 +1158,23 @@ unsigned getMaxNumVGPRs(const MCSubtargetInfo *STI, unsigned WavesPerEU) {
return std::min(MaxNumVGPRs, AddressableNumVGPRs);
}
-unsigned getNumVGPRBlocks(const MCSubtargetInfo *STI, unsigned NumVGPRs,
- std::optional<bool> EnableWavefrontSize32) {
- NumVGPRs = alignTo(std::max(1u, NumVGPRs),
- getVGPREncodingGranule(STI, EnableWavefrontSize32));
- // VGPRBlocks is actual number of VGPR blocks minus 1.
- return NumVGPRs / getVGPREncodingGranule(STI, EnableWavefrontSize32) - 1;
+static unsigned getNumBlocks(unsigned NumVGPRs, unsigned Granule) {
----------------
rovka wrote:
Now that you mention it, there's nothing VGPR specific here, since we're passing in both the number of registers and the granule. In fact, I should probably use this for `getNumSGPRBlocks` too. Maybe `getNumRegisterBlocks` would be best?
https://github.com/llvm/llvm-project/pull/84161
More information about the llvm-commits
mailing list