[Mlir-commits] [mlir] [mlir][dataflow] Drop DATAFLOW_DEBUG (NFC) (PR #176731)
lonely eagle
llvmlistbot at llvm.org
Mon Jan 19 03:15:17 PST 2026
https://github.com/linuxlonelyeagle created https://github.com/llvm/llvm-project/pull/176731
Now we use LDBG, so we no longer need LLVM_DEBUG.
>From 93ac5110784a2649e302361cc68cb4a9cabf890a Mon Sep 17 00:00:00 2001
From: linuxlonelyeagle <2020382038 at qq.com>
Date: Mon, 19 Jan 2026 10:59:49 +0000
Subject: [PATCH] drop DATAFLOW_DEBUG.
---
mlir/lib/Analysis/DataFlowFramework.cpp | 26 +++++++++----------------
1 file changed, 9 insertions(+), 17 deletions(-)
diff --git a/mlir/lib/Analysis/DataFlowFramework.cpp b/mlir/lib/Analysis/DataFlowFramework.cpp
index 56780e8b7b127..c848a98576845 100644
--- a/mlir/lib/Analysis/DataFlowFramework.cpp
+++ b/mlir/lib/Analysis/DataFlowFramework.cpp
@@ -19,11 +19,6 @@
#include "llvm/Support/raw_ostream.h"
#define DEBUG_TYPE "dataflow"
-#if LLVM_ENABLE_ABI_BREAKING_CHECKS
-#define DATAFLOW_DEBUG(X) LLVM_DEBUG(X)
-#else
-#define DATAFLOW_DEBUG(X)
-#endif // LLVM_ENABLE_ABI_BREAKING_CHECKS
using namespace mlir;
@@ -43,12 +38,10 @@ void AnalysisState::addDependency(ProgramPoint *dependent,
DataFlowAnalysis *analysis) {
auto inserted = dependents.insert({dependent, analysis});
(void)inserted;
- DATAFLOW_DEBUG({
- if (inserted) {
- LDBG() << "Creating dependency between " << debugName << " of " << anchor
- << "\nand " << debugName << " on " << *dependent;
- }
- });
+ if (inserted) {
+ LDBG() << "Creating dependency between " << debugName << " of " << anchor
+ << "\nand " << debugName << " on " << *dependent;
+ }
}
void AnalysisState::dump() const { print(llvm::errs()); }
@@ -127,7 +120,7 @@ LogicalResult DataFlowSolver::initializeAndRun(Operation *top) {
// Initialize the analyses.
for (DataFlowAnalysis &analysis : llvm::make_pointee_range(childAnalyses)) {
- DATAFLOW_DEBUG(LDBG() << "Priming analysis: " << analysis.debugName);
+ LDBG() << "Priming analysis: " << analysis.debugName;
if (failed(analysis.initialize(top)))
return failure();
}
@@ -139,8 +132,7 @@ LogicalResult DataFlowSolver::initializeAndRun(Operation *top) {
auto [point, analysis] = worklist.front();
worklist.pop();
- DATAFLOW_DEBUG(LDBG() << "Invoking '" << analysis->debugName
- << "' on: " << *point);
+ LDBG() << "Invoking '" << analysis->debugName << "' on: " << *point;
if (failed(analysis->visit(point)))
return failure();
}
@@ -153,9 +145,9 @@ void DataFlowSolver::propagateIfChanged(AnalysisState *state,
assert(isRunning &&
"DataFlowSolver is not running, should not use propagateIfChanged");
if (changed == ChangeResult::Change) {
- DATAFLOW_DEBUG(LDBG() << "Propagating update to " << state->debugName
- << " of " << state->anchor << "\n"
- << "Value: " << *state);
+ LDBG() << "Propagating update to " << state->debugName << " of "
+ << state->anchor << "\n"
+ << "Value: " << *state;
state->onUpdate(this);
}
}
More information about the Mlir-commits
mailing list