[llvm] [MachinePipeliner] Use `RegisterClassInfo::getRegPressureSetLimit` (PR #119827)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 00:48:09 PST 2024


================
@@ -1326,48 +1326,7 @@ class HighRegisterPressureDetector {
   // Calculate the upper limit of each pressure set
   void computePressureSetLimit(const RegisterClassInfo &RCI) {
     for (unsigned PSet = 0; PSet < PSetNum; PSet++)
-      PressureSetLimit[PSet] = TRI->getRegPressureSetLimit(MF, PSet);
-
-    // We assume fixed registers, such as stack pointer, are already in use.
-    // Therefore subtracting the weight of the fixed registers from the limit of
-    // each pressure set in advance.
-    SmallDenseSet<Register, 8> FixedRegs;
----------------
kasuga-fj wrote:

I ran tests and none of them failed. But that just means there are no correctness issues. This code is part of a heuristic decision, so performance degradation could happen in some cases (and I think the heuristics will be less accurate with this change).

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


More information about the llvm-commits mailing list