QBE QBE compiler backend
QBE is a compiler backend that aims to provide 70% of the performance of industrial optimizing compilers in 10% of the code. QBE fosters language innovation by offering a compact user-friendly and performant backend. The size limit constrains QBE to focus on the essential and prevents embarking on a never-ending path of diminishing returns.
Overview
The C codebase of QBE is intended to remain hobby-scale and pleasant to hack on. Despite the small footprint, QBE provides a number of optimizations with good impact/weight ratio. It also facilitates integration with foreign systems by implementing the C ABI in full. This means that programs compiled by QBE can trivially call into C, and vice versa. The current version of QBE can target amd64 (linux and osx), arm64, and riscv64. More QBE features Full support for the C ABI.
IEEE 32 and 64 bits floating point numbers.
Uniform and simple SSA-based intermediate language (IL).
Same IL used at all compilation stages.
Copy elimination.
Sparse conditional constant propagation.
Dead instructions elimination.
... continue reading