[llvm] MachineScheduler: Improve instruction clustering (PR #137784)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 29 05:30:44 PDT 2025


================
@@ -4015,11 +4028,25 @@ void GenericScheduler::reschedulePhysReg(SUnit *SU, bool isTop) {
 void GenericScheduler::schedNode(SUnit *SU, bool IsTopNode) {
   if (IsTopNode) {
     SU->TopReadyCycle = std::max(SU->TopReadyCycle, Top.getCurrCycle());
+    TopCluster = DAG->getCluster(SU->ParentClusterIdx);
+    LLVM_DEBUG(if (TopCluster) {
+      dbgs() << "  Top Cluster: ";
+      for (auto *N : *TopCluster)
+        dbgs() << N->NodeNum << '\t';
+      dbgs() << "\n";
----------------
arsenm wrote:

```suggestion
      dbgs() << '\n';
```

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


More information about the llvm-commits mailing list