[llvm-branch-commits] [mlir] [mlir][py] partially use mlir_type_subclass for IRTypes.cpp (PR #171143)

Maksim Levental via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Dec 8 07:38:38 PST 2025


https://github.com/makslevental requested changes to this pull request.

This isn't a hard block - just a request for discussion.

> This is part of a longer-term cleanup to only support one subclassing mechanism.

I had the same idea but I think we should go in the opposite direction - remove all of the `mlir_*_subclass`es and unify on `PyConcrete*`. I started that here https://github.com/llvm/llvm-project/pull/156575 but de-prioritized. If this unification is a  priority, I can finish that PR this week. 

I don't think `mlir_*_subclass` is the way to go - they're not "real" in the sense that you're giving up everything useful about nanobind by using them - i.e., all of the convenience `def*`, type signature generation, etc. 

Why do you think `mlir_type_subclass` should be it instead of PyConcreteType?

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


More information about the llvm-branch-commits mailing list