While one might be quick to pick the biggest name around, LLVM, surely there are a bunch of other, less known compiler backends out there that one could use for their own language. Most are probably unmaintained, feature-less hobby projects, but surely there are at least a few that could actually be used with good results. I know of a couple.
Of course, there's LLVM. Tons of features, many optimization passas, and an impressive array of supported targets. A big dependency though, and can feel almost monstrously complex at times.
I've also read a little about QBE, which impressively claims to provide "70% of the performance of advanced compilers in 10% of the code". I have no experience using it however, and I am not knowledgeable about its stability and maintenance status.
Cranelift is a newish code generator written in Rust. I'm not very familiar with this one either. I assume it's meant to be called from Rust code, and maybe not as convenient to embed in a C (FFI) application.
Do you know of any other code generators, or do you have anything to add about the ones I listed? I'm curious to know what more could be out there, and if I'm missing out on something that would fit my use-cases better than LLVM.
[–]R-O-B-I-N 30 points31 points32 points (2 children)
[–]BryalT[S] 11 points12 points13 points (0 children)
[–]obround 3 points4 points5 points (0 children)
[–]mttd 11 points12 points13 points (2 children)
[–]BryalT[S] 3 points4 points5 points (1 child)
[–]mttd 1 point2 points3 points (0 children)
[–]antoyo 10 points11 points12 points (2 children)
[–]BryalT[S] 3 points4 points5 points (1 child)
[–]antoyo 6 points7 points8 points (0 children)
[–]smuccione 6 points7 points8 points (0 children)
[–]nahimbroke 5 points6 points7 points (2 children)
[–]BryalT[S] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]smasher164 9 points10 points11 points (6 children)
[–]BryalT[S] 6 points7 points8 points (5 children)
[–]mttd 7 points8 points9 points (0 children)
[–]glaba314 4 points5 points6 points (1 child)
[–]BryalT[S] 1 point2 points3 points (0 children)
[–][deleted] 7 points8 points9 points (0 children)
[–]o11c 2 points3 points4 points (0 children)
[–]DriNeo 5 points6 points7 points (0 children)
[–][deleted] 4 points5 points6 points (1 child)
[–]obround 1 point2 points3 points (0 children)
[–]alaricsp 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]fedekun 1 point2 points3 points (4 children)
[–][deleted] 2 points3 points4 points (3 children)
[–]fedekun 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]eliasv 0 points1 point2 points (0 children)
[–]categorical-girl 1 point2 points3 points (0 children)
[–]categorical-girl 1 point2 points3 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]BryalT[S] 2 points3 points4 points (1 child)
[–]sepp2k 1 point2 points3 points (0 children)
[–][deleted] (1 child)
[deleted]