How to generate a const method for an opinterface in tbgen

Hi! I am looking for a way to generate a const method of a OpInterface through tbgen. And I’ve read Interfaces - MLIR, and find there’s only an example of StaticInterafceMethod is marked with “const”, but don’t know how. BTW, I think the example may be wrong as it is const but not static. How can I create a const method through tbgen. Thanks a lot.

You can’t control if the interface (non-static) method is const or not. Generally, we expect *Op classes not to have const methods, see Usage of 'const' in MLIR, for core IR types - MLIR.