Skip to content

Commit c97cfef

Browse files
committed
[MachineScheduler] Convert some of the debug prints into using LDBG. NFC
These lines are heavily skewed and hard to read. Using the new LDBG there instead. NFC.
1 parent 92d8313 commit c97cfef

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

llvm/lib/CodeGen/MachineScheduler.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
#include "llvm/Support/CommandLine.h"
5757
#include "llvm/Support/Compiler.h"
5858
#include "llvm/Support/Debug.h"
59+
#include "llvm/Support/DebugLog.h"
5960
#include "llvm/Support/ErrorHandling.h"
6061
#include "llvm/Support/GraphWriter.h"
6162
#include "llvm/Support/raw_ostream.h"
@@ -3349,14 +3350,16 @@ void GenericSchedulerBase::setPolicy(CandPolicy &Policy, bool IsPostRA,
33493350
if (CurrZone.getZoneCritResIdx() == OtherCritIdx)
33503351
return;
33513352

3352-
LLVM_DEBUG(if (CurrZone.isResourceLimited()) {
3353-
dbgs() << " " << CurrZone.Available.getName() << " ResourceLimited: "
3353+
if (CurrZone.isResourceLimited()) {
3354+
LDBG() << " " << CurrZone.Available.getName() << " ResourceLimited: "
33543355
<< SchedModel->getResourceName(CurrZone.getZoneCritResIdx()) << "\n";
3355-
} if (OtherResLimited) dbgs()
3356-
<< " RemainingLimit: "
3357-
<< SchedModel->getResourceName(OtherCritIdx) << "\n";
3358-
if (!CurrZone.isResourceLimited() && !OtherResLimited) dbgs()
3359-
<< " Latency limited both directions.\n");
3356+
}
3357+
if (OtherResLimited) {
3358+
LDBG() << " RemainingLimit: " << SchedModel->getResourceName(OtherCritIdx)
3359+
<< "\n";
3360+
}
3361+
if (!CurrZone.isResourceLimited() && !OtherResLimited)
3362+
LDBG() << " Latency limited both directions.\n";
33603363

33613364
if (CurrZone.isResourceLimited() && !Policy.ReduceResIdx)
33623365
Policy.ReduceResIdx = CurrZone.getZoneCritResIdx();

0 commit comments

Comments
 (0)