[Mlir-commits] [mlir] [mlir][dataflow] Improve DataFlowFramework debug output (PR #176632)
lonely eagle
llvmlistbot at llvm.org
Thu Feb 5 01:57:18 PST 2026
================
@@ -36,9 +36,24 @@ void AbstractSparseLattice::onUpdate(DataFlowSolver *solver) const {
AnalysisState::onUpdate(solver);
// Push all users of the value to the queue.
- for (Operation *user : cast<Value>(anchor).getUsers())
- for (DataFlowAnalysis *analysis : useDefSubscribers)
+ for (Operation *user : cast<Value>(anchor).getUsers()) {
+ for (DataFlowAnalysis *analysis : useDefSubscribers) {
+ LDBG() << debugName << " of " << anchor << "\n"
+ << "Value: " << *this << "\nenqueuing user dependent work item: "
+ << *solver->getProgramPointAfter(user) << "\nwith "
+ << AnalysisState::getAnalysisDebugName(analysis);
solver->enqueue({solver->getProgramPointAfter(user), analysis});
+ }
+ }
+}
+
+void AbstractSparseLattice::useDefSubscribe(DataFlowAnalysis *analysis) {
+ bool inserted = useDefSubscribers.insert(analysis);
+ if (inserted) {
+ LDBG() << debugName << " of " << anchor << "\n"
+ << "Value: " << *this << "\nsubscribing analysis: "
+ << AnalysisState::getAnalysisDebugName(analysis);
+ }
----------------
linuxlonelyeagle wrote:
```
[dataflow SparseAnalysis.cpp:53 1] mlir::dataflow::Lattice<mlir::dataflow::ConstantValue> of <block argument> of type 'index' at index: 0
[dataflow SparseAnalysis.cpp:53 1] Value: <UNINITIALIZED>
[dataflow SparseAnalysis.cpp:53 1] subscribing analysis: mlir::dataflow::DeadCodeAnalysis
```
https://github.com/llvm/llvm-project/pull/176632
More information about the Mlir-commits
mailing list