[Mlir-commits] [mlir] [mlir][reducer] Use LDBG in opt-reduction-pass (NFC) (PR #184026)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Mar 1 10:44:50 PST 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-core

Author: lonely eagle (linuxlonelyeagle)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/184026.diff


1 Files Affected:

- (modified) mlir/lib/Reducer/OptReductionPass.cpp (+5-4) 


``````````diff
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";
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/184026


More information about the Mlir-commits mailing list