Julia's UnifiedIR: A Single IR to Rule the Compiler Pipeline

UnifiedIR for Julia

Julia's UnifiedIR: A Single IR to Rule the Compiler Pipeline

I am introducing UnifiedIR, a groundbreaking data structure designed to unify Julia's compiler pipeline and external tools. By replacing fragmented intermediate representations with a single, flat statement table, we achieve seamless integration from syntax to optimization. This architecture enables powerful new features like graph-qualified provenance for diagnostics and aggressive cell promotion, significantly reducing overhead while maintaining zero dependencies.

compact_graph! gives lowering the GC over syntax graphs it always wanted.
  1. slwvx

    I guess "IR" is "intermediate representation" while "MLIR" [1] ("Multi-Level Intermediate Representation") is an IR from Chris Lattner/LLVM that is designed to be modular and extensible. For the uninitiated, I think [2] shows how the current Julia IR is generated and used in the Julia JIT compilation process

    [1] https://en.wikipedia.org/wiki/MLIR_(software)

    [2] https://docs.julialang.org/en/v1/devdocs/jit/

  2. KenoFischer

    Uh, hi guys. This is my PR, but you should probably know that this is an AI generated prototype based on some of my design documents, but nowhere near ready for prime time. I do want to do something like this, but whether it'll take this shape or another is still up in the air.

  3. jarbus

    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?

More from this day

2026-07-19