Remix.run Logo
pjmlp 2 days ago

LLVM project sees that otherwise, and the adoption across the LLVM community is quite telling where they stand.

alexrp 2 days ago | parent [-]

That doesn't seem like a good argument for why Zig ought to target MLIR instead of LLVM IR. I think I'd like to see some real-world examples of compilers for general-purpose programming languages using MLIR (ClangIR is still far from complete) before I entertain this particular argument.

pjmlp 2 days ago | parent [-]

Would Flang do it? Fortran was once general purpose.

https://github.com/llvm/llvm-project/blob/main/flang/docs/Hi...

Maybe the work in Swift (SIL), Rust (MIR), Julia (SSAIR) that were partially the inspiration for MLIR, alongside work done at Google designing Tensorflow compiler?

The main goal being an IR that would accomodate all use cases of those high level IRs.

Here are the presentation talk slides at European LLVM Developers Meeting back in 2019,

https://llvm.org/devmtg/2019-04/slides/Keynote-ShpeismanLatt...

Also you can find many general purpose enough users around this listing,

https://mlir.llvm.org/users/

pklausler 2 days ago | parent [-]

Are you saying that Fortran was once a general purpose programming language, but somehow changed to no longer be one?

pjmlp 2 days ago | parent [-]

Yes, because we are no longer in the 1960's - 1980's.

C and C++ took over many of the use cases people where using Fortran for during those decades.

In 2025, while it is a general purpose language, its use is constrained to scientific computing and HPC.

Most wannabe CUDA replacements keep forgetting Fortran is one of the reasons scientific community ignored OpenCL.

pklausler 2 days ago | parent [-]

So you're saying that the changes made to Fortran have made it more specialized?