[llvm-branch-commits] [llvm] [AMDGPU] Apply occupancy-aware register allocation anti-hints (PR #218074)

Lukas Sommer via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 24 02:49:10 PDT 2026


================
@@ -364,6 +369,17 @@ class SIRegisterInfo final : public AMDGPUGenRegisterInfo {
                              const MachineFunction &MF, const VirtRegMap *VRM,
                              const LiveRegMatrix *Matrix) const override;
 
+  bool shouldApplyAntiHints(const MachineFunction &MF,
+                            unsigned NumAllocatedVGPRs,
+                            unsigned &MaxVGPRsForCurrentOccupancy) const;
+
+  void applyRegAllocationAntiHints(
+      Register VirtReg, ArrayRef<MCPhysReg> &Order,
----------------
sommerlukas wrote:

```suggestion
      Register VirtReg, ArrayRef<MCPhysReg> Order,
```

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


More information about the llvm-branch-commits mailing list