[Mlir-commits] [mlir] [mlir][reducer] Use LDBG in opt-reduction-pass (NFC) (PR #184026)
lonely eagle
llvmlistbot at llvm.org
Sun Mar 1 10:44:18 PST 2026
https://github.com/linuxlonelyeagle created https://github.com/llvm/llvm-project/pull/184026
None
>From 84076b2cd9c124ea29dc9ed0bcb6a528562fe4fe Mon Sep 17 00:00:00 2001
From: linuxlonelyeagle <2020382038 at qq.com>
Date: Sun, 1 Mar 2026 18:36:18 +0000
Subject: [PATCH] use ldbg in opt-reduction-pass.
---
mlir/lib/Reducer/OptReductionPass.cpp | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/mlir/lib/Reducer/OptReductionPass.cpp b/mlir/lib/Reducer/OptReductionPass.cpp
index 7eb29a02702a8..931c0bc33875a 100644
--- a/mlir/lib/Reducer/OptReductionPass.cpp
+++ b/mlir/lib/Reducer/OptReductionPass.cpp
@@ -18,6 +18,7 @@
#include "mlir/Reducer/Tester.h"
#include "llvm/Support/Debug.h"
+#include "llvm/Support/DebugLog.h"
namespace mlir {
#define GEN_PASS_DEF_OPTREDUCTIONPASS
@@ -42,7 +43,7 @@ class OptReductionPass : public impl::OptReductionPassBase<OptReductionPass> {
/// Runs the pass instance in the pass pipeline.
void OptReductionPass::runOnOperation() {
- LLVM_DEBUG(llvm::dbgs() << "\nOptimization Reduction pass: ");
+ LDBG() << "\nOptimization Reduction pass: ";
Tester test(testerName, testerArgs);
@@ -80,12 +81,12 @@ void OptReductionPass::runOnOperation() {
module.getBody()->clear();
module.getBody()->getOperations().splice(
module.getBody()->begin(), moduleVariant.getBody()->getOperations());
- LLVM_DEBUG(llvm::dbgs() << "\nSuccessful Transformed version\n\n");
+ LDBG() << "\nSuccessful Transformed version\n";
} else {
- LLVM_DEBUG(llvm::dbgs() << "\nUnsuccessful Transformed version\n\n");
+ LDBG() << "\nUnsuccessful Transformed version\n";
}
moduleVariant->destroy();
- LLVM_DEBUG(llvm::dbgs() << "Pass Complete\n\n");
+ LDBG() << "Pass Complete\n";
}
More information about the Mlir-commits
mailing list