[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
Wed Mar 20 13:58:03 PDT 2024


jrbyrnes wrote:

> This was done conservatively on purpose. That is true we have total of 512 VGPRs, but only half of these a general purpose. Doubling it will result in a higher register pressure on some programs and spilling because most of the instructions may not use AGPRs. 

I'm afraid I don't follow. This is not doubling, but rather halving from 512 to 256. The goal is to reduce RP and avoid spilling. 

This will make the scheduler more conservative in terms of RP. AVReg are tracked as VGPR, so a limit of 256 will only be accurate if 100% of AVRegs are allocated as VGPR.

I don't understand how the current implementation is supposed to work. It seems to me, comparing pressure from RegKind::VGPR32 to 512 (assuming min-waves is 1) only makes sense if we add pressure from RegKind::AGPR32 , but even then, that would assume perfect allocation of AVRegs. We don't do that, though. We compare pressure from RegKind::VGPR32 to 512, then we compare pressure from RegKind::AGPR32 to 512


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


More information about the llvm-commits mailing list