C API Passes

Hi all!
I have some MLIR (16.0.6 version) bindings for OCaml. It’s closely matching the MLIR C API. Now I’m trying to implement a toy tutorial via OCaml.

I want to use loop fusion and AffineScalarReplacement passes.
How can I access these passes?

I know that we have mlirRegisterAllPasseslink, but what should I do with it next? I also know that mlir-tblgen have --gen-pass-capi-..., But I don’t understand how to use them…

For simplicity, you can use mlirParsePassPipeline and construct a pass pipeline from a string, the same way you’d do for mlir-opt’s --pass-pipeline command-line option.