[llvm] [AMDGPU] Examine instructions in pending queues during scheduling (PR #147653)
Jeffrey Byrnes via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 7 15:14:32 PDT 2025
================
@@ -319,17 +327,45 @@ void GCNSchedStrategy::initCandidate(SchedCandidate &Cand, SUnit *SU,
}
}
+static bool shouldCheckPending(SchedBoundary &Zone,
+ const TargetSchedModel *SchedModel) {
+ const unsigned ReadyListLimit = 256;
+ bool HasBufferedModel =
+ SchedModel->hasInstrSchedModel() && SchedModel->getMicroOpBufferSize();
+ return ExaminePendingQueue &&
+ Zone.Available.size() + Zone.Pending.size() <= ReadyListLimit &&
+ HasBufferedModel;
+}
+
+static SUnit *pickOnlyChoice(SchedBoundary &Zone,
+ const TargetSchedModel *SchedModel) {
+ if (!shouldCheckPending(Zone, SchedModel) || Zone.Pending.empty())
+ return Zone.pickOnlyChoice();
+ return nullptr;
----------------
jrbyrnes wrote:
We can probably pick the only pending instruction so long as we handle the cycle.
https://github.com/llvm/llvm-project/pull/147653
More information about the llvm-commits
mailing list