[llvm] [AMDGPU] Add stalls for DS FIFO buffer to coexec sched (PR #185726)
Lucas Ramirez via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 08:10:25 PDT 2026
================
@@ -191,14 +201,32 @@ class HardwareUnitInfo {
void setProducesCoexecWindow(bool Val) { ProducesCoexecWindow = Val; }
- bool contains(SUnit *SU) const { return AllSUs.contains(SU); }
+ bool contains(SUnit *SU) { return AllSUs.contains(SU); }
+
+ void setBufferSize(unsigned Size) { BufferSize = Size; }
+
+ unsigned getBufferSize() { return BufferSize; }
+
+ /// \returns the next cycle where there is space in the buffer.
+ unsigned getBufferAvailableCycle(unsigned CurrCycle) {
+ // There is no buffer.
+ if (BufferSize <= 1)
+ return CurrCycle;
+
+ // Buffer is available now.
+ if (ScheduledSUs.size() < BufferSize)
+ return CurrCycle;
+
+ return BufferCycles +
+ ScheduledSUs[ScheduledSUs.size() - BufferSize]->TopReadyCycle;
+ }
/// \returns true if there is a difference in priority between \p SU and \p
----------------
lucas-rami wrote:
Stale comment? This doesn't return a boolean
https://github.com/llvm/llvm-project/pull/185726
More information about the llvm-commits
mailing list