[llvm] [CodeGen][MachinePipeliner] Limit register pressure when scheduling (PR #74807)
Leandro Lupori via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 3 10:43:42 PST 2024
================
@@ -1102,6 +1121,359 @@ struct FuncUnitSorter {
}
};
+/// Calculate the maximum register pressure of the scheduled instructions stream
+class HighRegisterPressureDetector {
+ MachineBasicBlock *OrigMBB;
+ const MachineFunction &MF;
+ const MachineRegisterInfo &MRI;
+ const TargetRegisterInfo *TRI;
+
+ const unsigned PSetNum;
+
+ // Indexed by PSet ID
+ // InitSetPressure takes into account the register preesure of live-in
+ // registers. It's not depend on how the loop is scheduled, so it's enough to
+ // calculate them once at the begining.
----------------
luporl wrote:
```suggestion
// InitSetPressure takes into account the register pressure of live-in
// registers. It's not depend on how the loop is scheduled, so it's enough to
// calculate them once at the beginning.
```
https://github.com/llvm/llvm-project/pull/74807
More information about the llvm-commits
mailing list