[llvm] a741479 - [MachineScheduler] Convert some of the debug prints into using LDBG. NFC (#161997)

via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 4 23:19:24 PDT 2025


Author: Min-Yih Hsu
Date: 2025-10-04T23:19:20-07:00
New Revision: a7414796c0854a9e6f649d922a58aa63147ae2e4

URL: https://github.com/llvm/llvm-project/commit/a7414796c0854a9e6f649d922a58aa63147ae2e4
DIFF: https://github.com/llvm/llvm-project/commit/a7414796c0854a9e6f649d922a58aa63147ae2e4.diff

LOG: [MachineScheduler] Convert some of the debug prints into using LDBG. NFC (#161997)

These lines are heavily skewed and hard to read. Using the new LDBG
there instead.

NFC.

Added: 
    

Modified: 
    llvm/lib/CodeGen/MachineScheduler.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index 299bcc46e4bd2..22a59ec21b948 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -56,6 +56,7 @@
 #include "llvm/Support/CommandLine.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/Debug.h"
+#include "llvm/Support/DebugLog.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/GraphWriter.h"
 #include "llvm/Support/raw_ostream.h"
@@ -3349,14 +3350,16 @@ void GenericSchedulerBase::setPolicy(CandPolicy &Policy, bool IsPostRA,
   if (CurrZone.getZoneCritResIdx() == OtherCritIdx)
     return;
 
-  LLVM_DEBUG(if (CurrZone.isResourceLimited()) {
-    dbgs() << "  " << CurrZone.Available.getName() << " ResourceLimited: "
+  if (CurrZone.isResourceLimited()) {
+    LDBG() << "  " << CurrZone.Available.getName() << " ResourceLimited: "
            << SchedModel->getResourceName(CurrZone.getZoneCritResIdx()) << "\n";
-  } if (OtherResLimited) dbgs()
-                 << "  RemainingLimit: "
-                 << SchedModel->getResourceName(OtherCritIdx) << "\n";
-             if (!CurrZone.isResourceLimited() && !OtherResLimited) dbgs()
-             << "  Latency limited both directions.\n");
+  }
+  if (OtherResLimited) {
+    LDBG() << "  RemainingLimit: " << SchedModel->getResourceName(OtherCritIdx)
+           << "\n";
+  }
+  if (!CurrZone.isResourceLimited() && !OtherResLimited)
+    LDBG() << "  Latency limited both directions.\n";
 
   if (CurrZone.isResourceLimited() && !Policy.ReduceResIdx)
     Policy.ReduceResIdx = CurrZone.getZoneCritResIdx();


        


More information about the llvm-commits mailing list