[llvm] [AMDGPU] Constrain AV->VReg if we do not exceed RP thresholds (PR #150086)

Jeffrey Byrnes via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 24 11:41:42 PDT 2025


jrbyrnes wrote:

> Can you just drop the AV priorities to the bottom regardless of bitwidth?

We can, but we know it is better to use bitwidth if we don't need the AGPR assignment from AVGPR. So I think we should try to do teach the compiler about this in some way to reduce regression likelihood -- so long as doing so doesn't require some excessive burden. 

> I don't think the scheduler should be touching register classes at all. It has impacts outside of the current scheduling region, and the scheduler should not be increasing constraints

It is clear to me now that this particular RC transform should not happen in max-occupancy scheduling. It does not directly help reduce RP or directly help us to improve occupancy. That said, I believe RC transforms which can improve RP and result in better scheduling should happen in the scheduler. There is precedent for pre-sched-stage function-wide transforms (i.e. remat). 



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


More information about the llvm-commits mailing list