[all-commits] [llvm/llvm-project] bf16cf: [mlir] Avoid rewriting unreachable blocks in the g...
Vijay Kandiah via All-commits
all-commits at lists.llvm.org
Fri Sep 25 02:59:44 PDT 2026
Branch: refs/heads/users/mamini/greedy-rewrite-reachability
Home: https://github.com/llvm/llvm-project
Commit: bf16cf6a33f241d386f47ac3ec0669e982b9edbb
https://github.com/llvm/llvm-project/commit/bf16cf6a33f241d386f47ac3ec0669e982b9edbb
Author: Vijay Kandiah <vkandiah at nvidia.com>
Date: 2026-09-25 (Fri, 25 Sep 2026)
Changed paths:
M mlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
M mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
M mlir/test/Transforms/canonicalize-dce.mlir
A mlir/test/Transforms/greedy-cfg-reachability.mlir
M mlir/test/Transforms/test-strict-pattern-driver.mlir
M mlir/test/lib/Dialect/Test/TestPatterns.cpp
Log Message:
-----------
[mlir] Avoid rewriting unreachable blocks in the greedy driver
A rewrite can disconnect a block after the iteration's initial CFG sweep.
Track reachability through rewriter notifications and skip worklist operations
in unreachable blocks until the next iteration removes them.
Cache reachability per region. Compare the final successors of changed blocks
after each rewrite, preserving the cache for successor-equivalent changes and
block merges that keep surviving blocks reachable. Recompute for other CFG
changes. This avoids repeated full CFG scans during branch canonicalization.
Cover inserted and redirected blocks, blocks connected before rewrite
completion, nested regions, and explicit op-list behavior.
Assisted-by: Codex
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list