[Mlir-commits] [mlir] 6896725 - Support nice logging for `ProgramPoint*` in dataflow log (#154839)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Aug 22 10:45:30 PDT 2025


Author: Peng Chen
Date: 2025-08-22T19:45:26+02:00
New Revision: 68967252701f8fdebb7c3c399d801cbc5ff87e65

URL: https://github.com/llvm/llvm-project/commit/68967252701f8fdebb7c3c399d801cbc5ff87e65
DIFF: https://github.com/llvm/llvm-project/commit/68967252701f8fdebb7c3c399d801cbc5ff87e65.diff

LOG: Support nice logging for `ProgramPoint*` in dataflow log (#154839)

There're places where a pointer instead of `ProgramPoint` object is
passed to stream print `<<`, and they'll be printed as pointer value.
This PR converts them to object before passing to stream printers.

The address isn't much helpful in the debug and does not help when
diffing before/after debug traces.

Added: 
    

Modified: 
    mlir/lib/Analysis/DataFlowFramework.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Analysis/DataFlowFramework.cpp b/mlir/lib/Analysis/DataFlowFramework.cpp
index cc2c9eb8b5aa5..76bf94aed9e02 100644
--- a/mlir/lib/Analysis/DataFlowFramework.cpp
+++ b/mlir/lib/Analysis/DataFlowFramework.cpp
@@ -45,7 +45,7 @@ void AnalysisState::addDependency(ProgramPoint *dependent,
   DATAFLOW_DEBUG({
     if (inserted) {
       LDBG() << "Creating dependency between " << debugName << " of " << anchor
-             << "\nand " << debugName << " on " << dependent;
+             << "\nand " << debugName << " on " << *dependent;
     }
   });
 }
@@ -128,7 +128,7 @@ LogicalResult DataFlowSolver::initializeAndRun(Operation *top) {
     worklist.pop();
 
     DATAFLOW_DEBUG(LDBG() << "Invoking '" << analysis->debugName
-                          << "' on: " << point);
+                          << "' on: " << *point);
     if (failed(analysis->visit(point)))
       return failure();
   }


        


More information about the Mlir-commits mailing list