[llvm] [RegAlloc][RISCV] Increase the spill weight by target factor (PR #113675)

Kai Luo via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 27 06:38:36 PST 2024


================
@@ -926,6 +926,9 @@ class TargetRegisterInfo : public MCRegisterInfo {
   /// Returns a -1 terminated array of pressure set IDs.
   virtual const int *getRegUnitPressureSets(unsigned RegUnit) const = 0;
 
+  /// Get the factor of spill weight for this register class.
+  virtual unsigned getSpillWeightFactor(const TargetRegisterClass *RC) const;
----------------
bzEq wrote:

nit
```suggestion
  virtual unsigned getSpillWeightScaleFactor(const TargetRegisterClass *RC) const;
```

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


More information about the llvm-commits mailing list