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

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 23:33:20 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;
----------------
wangpc-pp wrote:

Yeah, it is a bad API. Fixed registers are not reserved register... Fixed register are registers defined in `FixedRegisters` RegisterCategory by default...
The logic here seems to want to remove reserved registers @kasuga-fj.

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


More information about the llvm-commits mailing list