[Mlir-commits] [mlir] [mlir][dataflow] Improve DataFlowFramework debug output (PR #176632)
lonely eagle
llvmlistbot at llvm.org
Thu Feb 5 02:16:19 PST 2026
================
@@ -42,17 +42,32 @@ AnalysisState::~AnalysisState() = default;
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;
+ << "\nand " << debugName << " on " << *dependent << "\nwith "
+ << analysis->debugName;
}
});
}
void AnalysisState::dump() const { print(llvm::errs()); }
+void AnalysisState::onUpdate(DataFlowSolver *solver) const {
+ for (const DataFlowSolver::WorkItem &item : dependents) {
+ DATAFLOW_DEBUG(LDBG() << debugName << " of " << anchor << "\n"
+ << "Value: " << *this
+ << "\nenqueueing dependent work item: " << *item.first
+ << "\nwith " << item.second->debugName);
+ solver->enqueue(item);
+ }
----------------
linuxlonelyeagle wrote:
Actually, I noticed the issue with garbled debug output earlier, so I’d like to take this opportunity to report it.I'm not entirely sure why it's behaving this way. @matthias-springer @joker-eph @ftynse
https://github.com/llvm/llvm-project/pull/176632
More information about the Mlir-commits
mailing list