[Mlir-commits] [mlir] [mlir][dataflow] Drop DATAFLOW_DEBUG (NFC) (PR #176731)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Mon Jan 19 03:15:52 PST 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: lonely eagle (linuxlonelyeagle)
<details>
<summary>Changes</summary>
Now we use LDBG, so we no longer need LLVM_DEBUG.
---
Full diff: https://github.com/llvm/llvm-project/pull/176731.diff
1 Files Affected:
- (modified) mlir/lib/Analysis/DataFlowFramework.cpp (+9-17)
``````````diff
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);
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/176731
More information about the Mlir-commits
mailing list