[llvm-branch-commits] [llvm] [TRI] Remove reserved registers in getRegPressureSetLimit (PR #211743)

Nathan Corbyn via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Aug 18 03:12:36 PDT 2026


================
@@ -781,9 +781,16 @@ class LLVM_ABI TargetRegisterInfo : public MCRegisterInfo {
   virtual const char *getRegPressureSetName(unsigned Idx) const = 0;
 
   /// Get the register unit pressure limit for this dimension.
-  /// This limit must be adjusted dynamically for reserved registers.
+  /// The limit will be adjusted for reserved registers.
+  /// Avoid using this method directly as it is costly to compute. Use the
+  /// cached version `RegisterClassInfo::getRegPressureSetLimit` instead.
   virtual unsigned getRegPressureSetLimit(const MachineFunction &MF,
----------------
cofibrant wrote:

I don't understand why this has moved out of `RegisterClassInfo.h`. If we're not supposed to call it directly, keep it as protected in `computePSetLimit()`.  I think the real patch here is just changing the name `getRegPressureSetLimit()` to `getRawPressureSetLimit()` on `TargetRegisterInfo.h`.

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


More information about the llvm-branch-commits mailing list