[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
Wed Jul 23 17:18:27 PDT 2025
jrbyrnes wrote:
> I don't really see the point of doing this. All the downstream register allocator code is free to re-inflate these right back to the AV_*.
The issue is that the register class priority is dependent upon the register pressure situation. If we need to use AGPRs, then it is best to assign AV last, otherwise, it is best to assign based on the bitwidth of the register. To address minor increase in register usage caused by https://github.com/llvm/llvm-project/pull/146606
For the NewVRegs after splitting, these will not use RC priority anyways.
A more direct solution is to provide a hook at some level in DefaultPriorityAdvisor::getPriority to allow dynamic RC priorites based on RP situation.
https://github.com/llvm/llvm-project/pull/150086
More information about the llvm-commits
mailing list