Hello, I am just discovering Roc, and I was thinking that instead of having a dedicated dev backend for x86 and another for AArch64, maybe it would be nice to use QBE instead. As far as I can tell the philosophies of the projects are very close, and QBE is really very fast. Of course the generated code is not nearly as fast as LLVM, but that's the point of the dev backend right, compile time speed rather than execution speed. QBE already supports arm64 and aarch64, as well as RiscV 64, and it just reached 1.0. What do you think ? (I don't want to do a Why not rust, I don't know how far in the development the ad hoc backends are and I don't suggest to throw everything away if they are almost done)
I don't have any experience in QBE but I've heard it's pretty fast! One goal of the dev backends is to design something that will compile as fast as possible, and leave no room for "what if we could make our compiler backend dependency faster?" Since relying on LLVM or QBE or anything else will always leave room for that question, I believe the intention is to just cut to the chase and specialize for the Roc compiler's use case from the get-go.
Yeah, I can understand that, and I guess if the backend directly takes an existing IR that maybe would usually be converted to LLVM IR later, you can expect to indeed cut most of the potential latencies.
Also of course, QBE doesn't try to be only fast, it tries to be a decent backend that people can use in production, even though it as only a fraction of the optimizations gcc and llvm do. And I can understand that in this situation this isn't a feature.
Yeah, I think there are zero optimizations planned for the dev backends
Even the register allocation is very simple, designed just to make compilation fast
Last updated: Jun 16 2026 at 16:19 UTC