r/ProgrammingLanguages • u/naharashu • 16d ago
Is there any other compiler backend other than LLVM, MLIR?
/r/Compilers/comments/1y04br0/is_there_any_other_compiler_backend_other_than/
10
Upvotes
29
u/Mickenfox 16d ago edited 16d ago
It's funny that Microsoft has spent 25 years developing a (now) MIT-licensed stack just for nobody to even remember CIL exists or that it has AOT compilation now.
3
u/Wriiight 15d ago
Web assembly is an alternative that is often overlooked
17
u/kat-tricks 16d ago
just saw QBE in a clip from a zozin stream, it's lighter than llvm and used in the Hare lang apparently?
11
u/GunpowderGuy 16d ago
https://cranelift.dev/
has the advantage over llvm, of having less technical debt. it also has a fast mode that is faster than llvm, and a optmization mode that has interesting properties over llvm
https://github.com/bytecodealliance/rfcs/blob/main/accepted/cranelift-egraph.md
3
u/bl4nkSl8 16d ago
Cranelift C via clang (though that uses llvm) or gcc
A bunch of smaller ones Zig (for some targets it doesn't use llvm)
2
u/david-1-1 14d ago
There is also the very old backend by Richard Freiburghouse that for the first time allowed many front ends for various languages (like PL/1) to generate code for a minicomputer that itself would fit into the small memory of a minicomputer.
2
u/categorical-girl 13d ago
Libfirm
1
u/L8_4_Dinner (Ⓧ Ecstasy/XVM) 15d ago
Check out Cliff Click's "Simple": https://github.com/SeaOfNodes/Simple
1
u/MCWizardYT 14d ago
If the language is high level and dynamic, it can target the JVM. Especially if it already uses bytecode; all you'd need to do is translate it.
GraalVM can streamline this process so that you don't even need to worry about the underlying bytecode. It provides Truffle, an awesome language developing framework. The project includes Espresso, which is a reference implementation of Java on top of Truffle that actually performs very well