[Mlir-commits] [mlir] [MLIR] Add more logging to DenseAnalysis/DeaDCodeAnalysis/TestDenseBackwardDataFlowAnalysis (NFC) (PR #161503)

Jacques Pienaar llvmlistbot at llvm.org
Mon Oct 6 12:41:32 PDT 2025


================
@@ -391,23 +551,32 @@ void AbstractDenseBackwardDataFlowAnalysis::visitBlock(Block *block) {
         b->getTerminator());
   };
   if (isExitBlock(block)) {
+    LDBG() << "  Processing exit block";
     // If this block is exiting from a callable, the successors of exiting from
     // a callable are the successors of all call sites. And the call sites
     // themselves are predecessors of the callable.
     auto callable = dyn_cast<CallableOpInterface>(block->getParentOp());
     if (callable && callable.getCallableRegion() == block->getParent()) {
+      LDBG() << "    Exit block of callable region";
       const auto *callsites = getOrCreateFor<PredecessorState>(
           point, getProgramPointAfter(callable));
       // If not all call sites are known, conservative mark all lattices as
       // having reached their pessimistic fix points.
       if (!callsites->allPredecessorsKnown() ||
           !getSolverConfig().isInterprocedural()) {
+        LDBG() << "    Not all callsites known or non-interprocedural, setting "
+                  "to exit state";
         return setToExitState(before);
       }
 
+      LDBG() << "    Processing " << callsites->getKnownPredecessors().size()
+             << " known callsites";
       for (Operation *callsite : callsites->getKnownPredecessors()) {
+        LDBG() << "      Processing callsite: "
----------------
jpienaar wrote:

All these spaces a bit rough, couldn't this just be a fixed number of \t s?

https://github.com/llvm/llvm-project/pull/161503


More information about the Mlir-commits mailing list