IIUC, you have an MLIR file that was generated using MLIR from LLVM 14 and wants to read the same IR with MLIR from LLVM 19. If that’s correct, then there is no such tool, since the changes aren’t tracked or versioned anywhere.
MLIR is an “always evolving” project, and we don’t have feature tracking, long term support or even stability guarantees. It does have a notion of versions in it, added a while back, but it’s not used upstream.
This is not exclusive to MLIR. LLVM IR, Clang AST and other compiler intermediate representations make no promises of stability over time either. Let alone tracking the deltas between any two arbitrary releases.
If you want to convert older MLIR files, you’ll have to write a tool yourself. By a “custom pass”, I imagine you mean an MLIR pass, say before your other passes. That’s not easy because the MLIR you’ll run will be the new version and if it doesn’t understand the old version, you won’t be able to read it in the first place.
The two main ways I can see this working is to either write a script (ex. Python) that will work on the textual version, or an LLVM program that will load two different versions of LLVM at different times, keeping a third-party binary representation in memory while you unload/reload the new LLVM. The former is clearly simpler, but the latter may be necessary if you can’t pass text around (ex. unix pipes).
MLIR has Python interfaces, which could be used to read and write MLIR files, and you could perhaps have both LLVMs installed and use them in separate? Or if this is a quicker job, just print to text, parse text and use some regular expressions to fudge it into the new LLVM.
Once the new LLVM accepts, I’d round-trip and print our the new IR from MLIR itself, so that you have a canonical form. You can inspect and see if that’s what you want (semantics preserved) and repeat for any future files.