QBE is really interesting, but for people like me who still use 32 bit architectures unfortunately a bit limited. Someone recently pointed me to the Eigen compiler kit (see e.g. https://github.com/EigenCompilerSuite/ ) which - like QBE - is a lean alternative to LLVM, but supports much more architectures than QBE, even some 16 bit ones; since last week also Xtensa (ESP32) is officially supported. It's still beyond me…
Although unfortunately not open source proper, vbcc[0][1] is interesting. 0. http://www.compilers.de/vbcc.html 1. https://en.wikipedia.org/wiki/Vbcc
QBE – Compiler Back End
11–20 of 38 posts
Re: QBE – Compiler Back End
#12Earlier quoted context omitted.
>Personally I consider ESP32 Sure you don't mean Tensilica i.e. legacy ESP32? Espressif has notably switched to RISC-V.
> 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/
Re: QBE – Compiler Back End
#13Earlier quoted context omitted.
Although unfortunately not open source proper, vbcc[0][1] is interesting. 0. http://www.compilers.de/vbcc.html 1. https://en.wikipedia.org/wiki/Vbcc
QBE (and Eigen) are compiler kits, i.e. useful if you implement your own compiler. There are a lot of open-source C compilers already available for nearly any architecture.
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.
Re: QBE – Compiler Back End
#14Earlier quoted context omitted.
> 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).
>Not really switched 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.
Re: QBE – Compiler Back End
#15Did a port of busybox bzip2 compression code to plain and simple C99, and cproc/qbe gives me 70-80% of gcc (13.2.0) speed on amd zen2 (tinycc generated machine code is 2 times slower than gcc, but it is really simple and clean assembly code... so it will have its use cases...). Namely, the combo of cproc/qbe + custom assembly would be the perfect toolchain for a lean open source stack with more than decent performanc…
Re: QBE – Compiler Back End
#16Split 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.
Re: QBE – Compiler Back End
#17Pronounced 'kyubey'? 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.
Re: QBE – Compiler Back End
#18Pronounced 'kyubey'? 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.
Re: QBE – Compiler Back End
#19As much as I like the idea behind QBE, our definition of "pleasant C code" differ by orders of magnitude.
Re: QBE – Compiler Back End
#20Pronounced 'kyubey'? 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.