Live data from Hacker News

UnifiedIR for Julia

github.com

21–23 of 23 posts

Re: UnifiedIR for Julia

#21
post #2

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?

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.

Re: UnifiedIR for Julia

#23

Earlier quoted context omitted.

The WasmGC and the lack of good support in LLVM is a pain, but having yet another IR may be worse decision in the long run compared with just using MLIR and submitting changes to have it work for you

Not sure the MLIR folks would appreciate a vibe-rewrite PR from C++ into Julia, but guess we could give it a go ;).

It would be more of just use MLIR and if you need some extensions for something upstream the changes needed.
Post reply on HN