QBE – Compiler Back End
c9x.me
c9x.me
Unfortunately missing in ECS is RISC-V, which QBE supports.
Well, the Tensilica ABI only took a few weeks to implement; so I assume that when enough people ask for a RISC-V backend, there will be one in reasonable time. Personally I consider ESP32 and ARM32 support more useful.
Sure you don't mean Tensilica i.e. legacy ESP32?
Espressif has notably switched to RISC-V.
Not really switched; they offer ESP32 models with (so far) single-core RISC-V; I don't think they planned to stop selling the original ESP32 designs (they wouldn't do themselves a favour).
Yes very much switched. Thoroughly[0].
While obviously only for new chips, years have already passed, and many new chips have been released. Tensilica are now only present in a minority of their offerings.
>I don't think they planned to stop selling the original ESP32 designs
In this market, having long term availability is important.
0. https://riscv.or.jp/en/2021/02/latest-esp32-includes-risc-v/
Well, in 2022 they upgraded to the L7 cores.
> having long term availability is important
So they will obviously continue to produce the tensilica models (which they wouldn't if they really "switched"); that's all I (and many other developers) need.
Of course, as it isn't open source, third party backends/frontends are unlikely to occur.
Fortunately, despite not open source, the code and documentation can still be studied.
EDIT: definitely not "maybe the most" popular
Given that software is always too big, this can often be a product-making distinction.
They are cheaper because they use less area, and they're also more memory efficient because pointers are all half as big. On these CPUs you don't have 4GB of RAM so you don't need a big address space.
Namely, the combo of cproc/qbe + custom assembly would be the perfect toolchain for a lean open source stack with more than decent performance. Yeah, but we have still people missing out why c++ is so much toxic...
Cwerg has backends for x86-64, Aarch64, Arm32 (non-thumb) and can produce executables, i.e. comes with an assembler.
It is however fairly opinionated in many ways.
As much as I like the idea behind QBE, our definition of "pleasant C code" differ by orders of magnitude.
Show HN: https://news.ycombinator.com/item?id=11555527 (April 23, 2016 — 241 points, 68 comments)
QBE vs. LLVM:
https://news.ycombinator.com/item?id=25273907
IR:
https://en.wikipedia.org/wiki/Intermediate_representation
Transpilation – A summary of ideas about transpilation (AI, LLM, Code, etc.):
see, e.g,. https://c9x.me/git/qbe.git/tree/ssa.c
if (!n) {
/* uh, oh, warn */
return UNDEF;If I recall correctly, the author has no interest in re-architecturing qbe like this.
Split spiller and register allocator thanks to SSA form. (Simpler and faster than graph coloring.)
IMHO the fixation on graph colouring really held back the development of compilers. SSA was known in the late 80s but for some reason everyone thought graph colouring was the Right Way To Do It, and it only took until the turn of the century for that sentiment to change.