[llvm-branch-commits] [llvm] [2/3][AMDGPU] Physical register tracking in GCN trackers. (PR #184275)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu May 7 04:51:33 PDT 2026


================
@@ -130,6 +131,10 @@ struct GCNRegPressure {
            LaneBitmask NewMask,
            const MachineRegisterInfo &MRI);
 
+  /// Update pressure for a physical register (add or remove). Used when
+  /// tracking physical registers.
+  void inc(MCRegister Reg, bool IsAdd, const MachineRegisterInfo &MRI);
----------------
macurtis-amd wrote:

nit: I think it would be more readable at the call sites if this was:
```
void inc(MCRegister Reg, const MachineRegisterInfo &MRI, bool IsAdd = true);
void dec(MCRegister Reg, const MachineRegisterInfo &MRI) { inc(Reg, MRI, false); }
```

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


More information about the llvm-branch-commits mailing list