[Mlir-commits] [mlir] [mlir][py] ability to downcast AffineExpr after #172892 (PR #174808)

Maksim Levental llvmlistbot at llvm.org
Wed Jan 7 09:27:23 PST 2026


================
@@ -593,6 +614,7 @@ void populateIRAffine(nb::module_ &m) {
              return PyAffineExpr(self.getContext(),
                                  mlirAffineExprCompose(self, other));
            })
+      .def_prop_ro("maybe_downcast", &PyAffineExpr::maybeDownCast)
----------------
makslevental wrote:

you don't really need this (also it probably shouldn't be a prop) - we had these around for being able to "indirect" through the (Python) interpreter. anyway it's fine to leave (for debugging and such) but make it just a `.def` I think.

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


More information about the Mlir-commits mailing list