[llvm] misched: remove TODO and replace computation with variable (PR #119551)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 04:27:32 PST 2024


https://github.com/ywgrit created https://github.com/llvm/llvm-project/pull/119551

None

>From 41f2d32170ea1f892f89b16233a896c494e95722 Mon Sep 17 00:00:00 2001
From: Xin Wang <yw987194828 at gmail.com>
Date: Wed, 11 Dec 2024 20:25:06 +0800
Subject: [PATCH] misched: remove TODO and replace computation with variable

---
 llvm/lib/CodeGen/MachineScheduler.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index 1722bdda99e4af..77aeaf58e977f2 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -2450,8 +2450,6 @@ SchedBoundary::getNextResourceCycle(const MCSchedClassDesc *SC, unsigned PIdx,
 /// simple counters that the scheduler itself maintains. It explicitly checks
 /// for instruction dispatch limitations, including the number of micro-ops that
 /// can dispatch per cycle.
-///
-/// TODO: Also check whether the SU must start a new group.
 bool SchedBoundary::checkHazard(SUnit *SU) {
   if (HazardRec->isEnabled()
       && HazardRec->getHazardType(SU) != ScheduleHazardRecognizer::NoHazard) {
@@ -2461,7 +2459,7 @@ bool SchedBoundary::checkHazard(SUnit *SU) {
   unsigned uops = SchedModel->getNumMicroOps(SU->getInstr());
   if ((CurrMOps > 0) && (CurrMOps + uops > SchedModel->getIssueWidth())) {
     LLVM_DEBUG(dbgs() << "  SU(" << SU->NodeNum << ") uops="
-                      << SchedModel->getNumMicroOps(SU->getInstr()) << '\n');
+                      << uops << '\n');
     return true;
   }
 



More information about the llvm-commits mailing list