[Mlir-commits] [mlir] [mlir][IR] Make `replaceOp` / `replaceAllUsesWith` API consistent (PR #82629)

Matthias Springer llvmlistbot at llvm.org
Fri Feb 23 00:40:27 PST 2024


matthias-springer wrote:

> Seems like very little usage in tree for these APIs!!

We have a few internal uses, but not many. Maybe this API is not really needed, not sure.. I didn't want to delete anything.

This change is mainly in preparation of a dialect conversion improvement. I'd like to add support for `replaceAllUsesWith`. This would also simplify the design a bit (e.g., no more special conversion pattern API needed for block arguments like `replaceUsesOfBlockArgument`). And `RewriterBase::replaceOp` would no longer be virtual. Instead `RewriterBase::replaceAllUsesWith` would be virtual.

I wanted to make sure that the rewriter API is consistent first.


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


More information about the Mlir-commits mailing list