[Mlir-commits] [mlir] [mlir][Transforms] Deactivate `replaceAllUsesWith` in dialect conversion (PR #154112)
Matthias Springer
llvmlistbot at llvm.org
Mon Aug 25 02:41:32 PDT 2025
matthias-springer wrote:
I'm not going to merge this for now. There are issues in Flang and potentially in downstream projects: they are using `replaceAllUsesWith` and deactivating this API now would make it difficult to work around the issue.
The workaround of `value.replaceAllUsesWith` (as mentioned in the commit message) is not a full replacement for `rewriter.replaceAllUsesWith`. (`RewriterBase::replaceAllUsesWith` calls `modifyOpInPlace`, so it does actually support rollback. The main problem with `RewriterBase::replaceAllUsesWith` is that it does not see all uses of an SSA value, because some of the uses have not materialized yet.)
I plan to add full support for `rewriter.replaceAllUsesWith` over a series of PRs. The first one being #155227.
https://github.com/llvm/llvm-project/pull/154112
More information about the Mlir-commits
mailing list