[llvm] [Draft][AMDGPU] Rematerialize VGPR candidates when SGPR spills results in VGPR Excess (PR #168079)
Lucas Ramirez via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 20 03:11:28 PST 2025
Juan Manuel Martinez =?utf-8?q?Caamaño?=,
Juan Manuel Martinez =?utf-8?q?Caamaño?=,
Juan Manuel Martinez =?utf-8?q?Caamaño?=,
Juan Manuel Martinez =?utf-8?q?Caamaño?Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/168079 at github.com>
================
@@ -406,15 +416,15 @@ bool GCNRPTarget::isSaveBeneficial(Register Reg) const {
const TargetRegisterInfo *TRI = MRI.getTargetRegisterInfo();
const SIRegisterInfo *SRI = static_cast<const SIRegisterInfo *>(TRI);
+ RegExcess Excess(MF, RP, MaxSGPRs, MaxVGPRs);
----------------
lucas-rami wrote:
Shouldn't `MaxVGPRs` be `MaxUnifiedVGPRs`? I don't think we want the function's behavior to change when we don't have SGPR spills, and it looks like this will cause the function to report new beneficial saves in cases where the target has already been reached (e.g. gfx942, `MaxUnifiedVGPRs=512`, `MaxVGPRs=256`).
https://github.com/llvm/llvm-project/pull/168079
More information about the llvm-commits
mailing list