[llvm-branch-commits] [llvm] [AMDGPU][Scheduler] Prepare remat stage for rematerializer integration (NFC) (PR #189489)
Lucas Ramirez via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Apr 2 03:57:10 PDT 2026
================
@@ -424,6 +424,17 @@ bool GCNRPTarget::isSaveBeneficial(Register Reg) const {
return (UnifiedRF && Excess.VGPR) || Excess.ArchVGPR;
}
+bool GCNRPTarget::isSaveBeneficial(const GCNRegPressure &SaveRP) const {
+ RegExcess Excess(MF, RP, *this);
+ if (SaveRP.getSGPRNum() && Excess.SGPR)
----------------
lucas-rami wrote:
Sorry not sure I understand. I want the if to read "if this would save SGPRs (`getSGPRNum() != 0`) and we are currently above our SGPR budget (`Excess.SGPR != 0`) then this save is useful", so this should be ok?
https://github.com/llvm/llvm-project/pull/189489
More information about the llvm-branch-commits
mailing list