3 ms·
As the guy currently handling Zig's LLVM upgrades, I do not see this as an advantage at all. The more IR layers I have to go through to diagnose miscompilations
by alexrp 1y ago
As the guy currently handling Zig's LLVM upgrades, I do not see this as an advantage at all. The more IR layers I have to go through to diagnose miscompilations, the more of a miserable experience it becomes. I don't know that I would have the motivation to continue doing the upgrades if I also had to deal with MLIR.
- pjmlp 1y agoLLVM project sees that otherwise, and the adoption across the LLVM community is quite telling where they stand.
- alexrp 1y agoThat 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 1y agoWould Flang do it? Fortran was once general purpose. https://github.com/llvm/llvm-project/blob/main/flang/docs/HighLevelFIR.md 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-ShpeismanLattner-MLIR.pdf 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/ https://mlir.llvm.org/users/
- pklausler 1y agoAre you saying that Fortran was once a general purpose programming language, but somehow changed to no longer be one?
- pjmlp 1y agoYes, 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 1y agoSo you're saying that the changes made to Fortran have made it more specialized?