Open-Source TPDE Can Compile Code 10-20x Faster Than LLVM
- Reference: 0001550755
- News link: https://www.phoronix.com/news/TPDE-Faster-Compile-Than-LLVM
- Source link:
The researchers in Munich have published [1]this research paper around the TPDE framework. The TPDE code is open-source on [2]GitHub where they sum it up as:
"TPDE is a fast compiler back-end framework that adapts to existing SSA IRs. The primary goal is low-latency compilation while maintaining reasonable (-O0) code quality, e.g., as baseline compiler for JIT compilation or unoptimized builds. Currently, TPDE only targets ELF-based x86-64 and AArch64 (Armv8.1) platforms."
It's important to note that the comparison is done at the -O0 optimization level and what they are comparing with LLVM upstream at -O0 rather than the higher optimization levels like -O2 or -O3. TPDE provides TPDE-LLVM as a standalone back-end for LLVM that is summed up as:
"TPDE-LLVM: a standalone back-end for LLVM-IR, which compiles 10--20x faster than LLVM -O0 with similar code quality, usable as library (e.g., for JIT), as tool (tpde-llc), and integrated in Clang/Flang (with a patch)."
Today they also announced their TPDE work on [3]the LLVM.org Discourse where they also included some SPEC CPU 2017 comparison build results and more details. The key takeaway:
"We recently open-sourced TPDE and our fast LLVM baseline back-end (TPDE-LLVM), which is 10-20x faster than the LLVM -O0 back-end with similar runtime performance and 10-30% larger code size. We support a typical subset of LLVM-IR and only target x86-64 and AArch64."
And their comparison benchmarks to upstream LLVM:
For now their focus is just on the -O0 and -O1 optimization level usage. Very interesting work and hopefully these researchers continue building upon TPDE and exploring other compiler performance optimizations.
[1] https://arxiv.org/abs/2505.22610
[2] https://github.com/tpde2/tpde?tab=readme-ov-file
[3] https://discourse.llvm.org/t/tpde-llvm-10-20x-faster-llvm-o0-back-end/86664
cb88