[llvm] [AMDGPU] Use correct VGPR threshold for flagging ExcessRP regions in unified register file case (PR #85860)

Jeffrey Byrnes via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 13:28:11 PDT 2024


================
@@ -1155,12 +1155,16 @@ unsigned getMinNumVGPRs(const MCSubtargetInfo *STI, unsigned WavesPerEU) {
   return std::min(MinNumVGPRs, AddrsableNumVGPRs);
 }
 
-unsigned getMaxNumVGPRs(const MCSubtargetInfo *STI, unsigned WavesPerEU) {
+unsigned getMaxNumVGPRs(const MCSubtargetInfo *STI, unsigned WavesPerEU,
+                        bool WholeRegisterFile) {
   assert(WavesPerEU != 0);
 
-  unsigned MaxNumVGPRs = alignDown(getTotalNumVGPRs(STI) / WavesPerEU,
-                                   getVGPRAllocGranule(STI));
-  unsigned AddressableNumVGPRs = getAddressableNumVGPRs(STI);
+  unsigned MaxNumVGPRs =
+      alignDown(getTotalNumVGPRs(STI, WholeRegisterFile) / WavesPerEU,
----------------
jrbyrnes wrote:

Ah, yes I see thanks. I will account for this.

https://github.com/llvm/llvm-project/pull/85860


More information about the llvm-commits mailing list