[llvm] [AMDGPU] Optionally Use GCNRPTrackers during scheduling (PR #93090)

Valery Pykhtin via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 4 07:10:11 PDT 2024


================
@@ -343,17 +407,47 @@ void GCNRPTracker::reset(const MachineInstr &MI,
   MaxPressure = CurPressure = getRegPressure(*MRI, LiveRegs);
 }
 
-////////////////////////////////////////////////////////////////////////////////
-// GCNUpwardRPTracker
-
-void GCNUpwardRPTracker::reset(const MachineRegisterInfo &MRI_,
-                               const LiveRegSet &LiveRegs_) {
+void GCNRPTracker::reset(const MachineRegisterInfo &MRI_,
+                         const LiveRegSet &LiveRegs_) {
   MRI = &MRI_;
   LiveRegs = LiveRegs_;
   LastTrackedMI = nullptr;
   MaxPressure = CurPressure = getRegPressure(MRI_, LiveRegs_);
 }
 
+void GCNRPTracker::bumpDeadDefs(ArrayRef<RegisterMaskPair> DeadDefs) {
----------------
vpykhtin wrote:

Better name for bumpDeadDefs? It's unclear from the function name what it does. The function assumes that the input is DeadDefs but it's upon caller to provide that. Should it be an utility function say "updateMaxPressure" and rename DeadDefs to LiveRegs?

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


More information about the llvm-commits mailing list