FunctionPass has been marked deprecated, please switch to OperationPass<FuncOp>(in C++) and Pass<"...", "::mlir::FuncOp"> (in Tablegen) instead. The main change in behavior is that FunctionPass implicitly skips external functions whereas OperationPass<FuncOp> does not, so please pay attention when switching your passes if you need to add new explicitly skipping of external functions or not.
Some Rationale: FunctionPass is from a time before functions were operations (and well, before operations were even a thing). It was created when MLIR had a structure similar to LLVM, but its existence is not very justifiable in modern MLIR where FuncOp is just another operation (and not really one that deserves/needs to be priviledged).
I’ve left the definition of FunctionPass as-is for now, but it will be removed in 1.5-2 weeks.
Currently, the above solution for tablegen produces an error saying
/build/tools/mlir/include/mlir/Conversion/Passes.h.inc:3783:73: error: no member named 'FuncOp' in namespace 'mlir'
class MyPass : public ::mlir::OperationPass<::mlir::FuncOp> {
~~~~~~~~^
I take it that it has now changed to Pass<"...", "::mlir::func::FuncOp">?
If so, when I try to add a new conversion pass with the above signature in tablegen, building mlir-opt fails saying
/build/tools/mlir/include/mlir/Conversion/Passes.h.inc:3783:73: error: no member named 'func' in namespace 'mlir'
class MyPass : public ::mlir::OperationPass<::mlir::func::FuncOp> {
~~~~~~~~^