The new version of QBE has been released – a universal backend for compiler creation.
QBE differs from its closest analogue (LLVM) with a much simpler codebase, high performance, and faster builds (QBE itself compiles from source in less than a second on a Core2Duo), along with a more developer-friendly API, including a simpler intermediate language (IL). However, QBE is not intended for creating industrial compilers with high-quality code generation requirements but is well-suited for hobby projects and prototypes.
Binary code generation is supported for x86_64, AArch64, and RISC-V (rv64) architectures. Notable projects using QBE include C compilers such as cproc, SCC, and PACC, as well as compilers for the Hare and Antimony languages. QBE is also used in the compiler development course at the V.P. Ivannikov Institute for System Programming of the Russian Academy of Sciences.
Among the changes in the new release:
- Support for Windows ABI has been added;
- New optimizations have been introduced that enhance the generated code. On average, tests show that code generated by QBE achieves about 63% of the performance of code from GCC;
- Improved support for generating PIE (position-independent code).
The code is written in C (C99) and is released under the MIT license.
Source: linux.org.ru
