[Mlir-commits] [mlir] [mlir, python] Expose replaceAllUsesExcept to Python bindings (PR #115850)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Tue Nov 12 09:49:46 PST 2024


================
@@ -3718,6 +3724,36 @@ void mlir::python::populateIRCore(py::module &m) {
             mlirValueReplaceAllUsesOfWith(self.get(), with.get());
           },
           kValueReplaceAllUsesWithDocstring)
+      .def(
+          "replace_all_uses_except",
+          [](PyValue &self, PyValue &with, PyOperation &exception) {
----------------
ftynse wrote:

It should be possible to take `MlirValue` here directly and avoid the conversion below.

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


More information about the Mlir-commits mailing list