[Mlir-commits] [mlir] [MLIR] Add logging to eraseUnreachableBlocks (NFC) (PR #153968)
Jacques Pienaar
llvmlistbot at llvm.org
Mon Aug 18 06:55:20 PDT 2025
================
@@ -182,19 +185,34 @@ SmallVector<Value> mlir::makeRegionIsolatedFromAbove(
// TODO: We could likely merge this with the DCE algorithm below.
LogicalResult mlir::eraseUnreachableBlocks(RewriterBase &rewriter,
MutableArrayRef<Region> regions) {
+ LDBG() << "Starting eraseUnreachableBlocks with " << regions.size()
+ << " regions";
+
// Set of blocks found to be reachable within a given region.
llvm::df_iterator_default_set<Block *, 16> reachable;
// If any blocks were found to be dead.
- bool erasedDeadBlocks = false;
+ int erasedDeadBlocks = 0;
----------------
jpienaar wrote:
If this weren't a util, a statistic would have been useful for additional reporting.
https://github.com/llvm/llvm-project/pull/153968
More information about the Mlir-commits
mailing list