Skip to content

Commit 8100099

Browse files
committed
[MLIR] Adopt LDBG() macro in mlir/lib/Transforms/... (NFC)
1 parent a19b634 commit 8100099

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

mlir/lib/Transforms/InlinerPass.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "mlir/Analysis/CallGraph.h"
1919
#include "mlir/Pass/PassManager.h"
2020
#include "mlir/Transforms/Inliner.h"
21+
#include "llvm/Support/DebugLog.h"
2122

2223
namespace mlir {
2324
#define GEN_PASS_DEF_INLINER
@@ -120,8 +121,8 @@ static bool isProfitableToInline(const Inliner::ResolvedCall &resolvedCall,
120121
return true;
121122

122123
unsigned ratio = countOps(calleeRegion) * 100 / callerOps;
123-
LLVM_DEBUG(llvm::dbgs() << "Callee / caller operation ratio (max: "
124-
<< inliningThreshold << "%): " << ratio << "%\n");
124+
LDBG() << "Callee / caller operation ratio (max: " << inliningThreshold
125+
<< "%): " << ratio << "%";
125126
return ratio <= inliningThreshold;
126127
}
127128

mlir/lib/Transforms/Mem2Reg.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "mlir/Interfaces/MemorySlotInterfaces.h"
2020
#include "mlir/Transforms/Passes.h"
2121
#include "llvm/ADT/STLExtras.h"
22+
#include "llvm/Support/DebugLog.h"
2223
#include "llvm/Support/GenericIteratedDominanceFrontier.h"
2324

2425
namespace mlir {
@@ -632,8 +633,7 @@ MemorySlotPromoter::promoteSlot() {
632633
}
633634
}
634635

635-
LLVM_DEBUG(llvm::dbgs() << "[mem2reg] Promoted memory slot: " << slot.ptr
636-
<< "\n");
636+
LDBG() << "Promoted memory slot: " << slot.ptr;
637637

638638
if (statistics.promotedAmount)
639639
(*statistics.promotedAmount)++;

mlir/lib/Transforms/SROA.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "mlir/Analysis/TopologicalSortUtils.h"
1313
#include "mlir/Interfaces/MemorySlotInterfaces.h"
1414
#include "mlir/Transforms/Passes.h"
15+
#include "llvm/Support/DebugLog.h"
1516

1617
namespace mlir {
1718
#define GEN_PASS_DEF_SROA
@@ -180,8 +181,7 @@ static void destructureSlot(
180181
assert(slot.ptr.use_empty() && "after destructuring, the original slot "
181182
"pointer should no longer be used");
182183

183-
LLVM_DEBUG(llvm::dbgs() << "[sroa] Destructured memory slot: " << slot.ptr
184-
<< "\n");
184+
LDBG() << "Destructured memory slot: " << slot.ptr;
185185

186186
if (statistics.destructuredAmount)
187187
(*statistics.destructuredAmount)++;

0 commit comments

Comments
 (0)