I was unaware of alternative IRs for julia (albeit I started learning much more about compilers once I left the julia ecosystem). What other IRs is this supposed to replace? And why not just go with MLIR directly?

Julia has roughly 2 different IRs that live pre LLVM (one for type inference, one for Julia level optimization). This is a proposed replacement to both of these. The reason not to go MLIR is that writing Julia is a lot nicer than writing C++.

MLIR pulls in a lot of interface complexity that we don't want or need for pure-julia end-users. That said, it is obviously and deliberately close to MLIR as a representation since people do want to be able to interface with MLIR (e.g. in Enzyme), so I'd like to facilitate easy conversion back and forth.

You can depend on just MLIR core; Mojo (from Modular) uses MLIR, with only the index and LLVM dialects coming from upstream MLIR. The benefit is that you focus on designing your IR without also building supporting infrastructure, while having MLIR ecosystem at hand should you need it.

[deleted]