[Mlir-commits] [mlir] 8100099 - [MLIR] Adopt LDBG() macro in mlir/lib/Transforms/... (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Sat Aug 23 13:11:55 PDT 2025
Author: Mehdi Amini
Date: 2025-08-23T13:11:41-07:00
New Revision: 810009906d107ea728500daff3b429a997e69cc4
URL: https://github.com/llvm/llvm-project/commit/810009906d107ea728500daff3b429a997e69cc4
DIFF: https://github.com/llvm/llvm-project/commit/810009906d107ea728500daff3b429a997e69cc4.diff
LOG: [MLIR] Adopt LDBG() macro in mlir/lib/Transforms/... (NFC)
Added:
Modified:
mlir/lib/Transforms/InlinerPass.cpp
mlir/lib/Transforms/Mem2Reg.cpp
mlir/lib/Transforms/SROA.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Transforms/InlinerPass.cpp b/mlir/lib/Transforms/InlinerPass.cpp
index 703e517d45374..b07363c3dafe4 100644
--- a/mlir/lib/Transforms/InlinerPass.cpp
+++ b/mlir/lib/Transforms/InlinerPass.cpp
@@ -18,6 +18,7 @@
#include "mlir/Analysis/CallGraph.h"
#include "mlir/Pass/PassManager.h"
#include "mlir/Transforms/Inliner.h"
+#include "llvm/Support/DebugLog.h"
namespace mlir {
#define GEN_PASS_DEF_INLINER
@@ -120,8 +121,8 @@ static bool isProfitableToInline(const Inliner::ResolvedCall &resolvedCall,
return true;
unsigned ratio = countOps(calleeRegion) * 100 / callerOps;
- LLVM_DEBUG(llvm::dbgs() << "Callee / caller operation ratio (max: "
- << inliningThreshold << "%): " << ratio << "%\n");
+ LDBG() << "Callee / caller operation ratio (max: " << inliningThreshold
+ << "%): " << ratio << "%";
return ratio <= inliningThreshold;
}
diff --git a/mlir/lib/Transforms/Mem2Reg.cpp b/mlir/lib/Transforms/Mem2Reg.cpp
index cf039c328e07f..d36a3c1362c19 100644
--- a/mlir/lib/Transforms/Mem2Reg.cpp
+++ b/mlir/lib/Transforms/Mem2Reg.cpp
@@ -19,6 +19,7 @@
#include "mlir/Interfaces/MemorySlotInterfaces.h"
#include "mlir/Transforms/Passes.h"
#include "llvm/ADT/STLExtras.h"
+#include "llvm/Support/DebugLog.h"
#include "llvm/Support/GenericIteratedDominanceFrontier.h"
namespace mlir {
@@ -632,8 +633,7 @@ MemorySlotPromoter::promoteSlot() {
}
}
- LLVM_DEBUG(llvm::dbgs() << "[mem2reg] Promoted memory slot: " << slot.ptr
- << "\n");
+ LDBG() << "Promoted memory slot: " << slot.ptr;
if (statistics.promotedAmount)
(*statistics.promotedAmount)++;
diff --git a/mlir/lib/Transforms/SROA.cpp b/mlir/lib/Transforms/SROA.cpp
index 67f536a5cfdfa..859c0302185e6 100644
--- a/mlir/lib/Transforms/SROA.cpp
+++ b/mlir/lib/Transforms/SROA.cpp
@@ -12,6 +12,7 @@
#include "mlir/Analysis/TopologicalSortUtils.h"
#include "mlir/Interfaces/MemorySlotInterfaces.h"
#include "mlir/Transforms/Passes.h"
+#include "llvm/Support/DebugLog.h"
namespace mlir {
#define GEN_PASS_DEF_SROA
@@ -180,8 +181,7 @@ static void destructureSlot(
assert(slot.ptr.use_empty() && "after destructuring, the original slot "
"pointer should no longer be used");
- LLVM_DEBUG(llvm::dbgs() << "[sroa] Destructured memory slot: " << slot.ptr
- << "\n");
+ LDBG() << "Destructured memory slot: " << slot.ptr;
if (statistics.destructuredAmount)
(*statistics.destructuredAmount)++;
More information about the Mlir-commits
mailing list