TPDE: A Fast Adaptable Compiler Back-End Framework

πŸ“… 2025-05-28
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
Existing compilers (e.g., LLVM) prioritize optimization over low-latency compilation, incurring substantial IR transformation overhead; custom backends suffer from high development costs and poor cross-architecture portability. This paper proposes a lightweight, single-pass, adaptive JIT backend framework that directly consumes source IR in SSA form and unifies instruction selection, register allocation, and machine code emission. It introduces the first IR-agnostic adapter mechanism, enabling zero-transformation integration of heterogeneous IRsβ€”including LLVM IR, WebAssembly bytecode, and database query plans. Semantic-driven, architecture-independent optimizations are performed natively, with built-in support for x86-64 and AArch64. Evaluated on SPECint 2017, our compiler achieves 8–24Γ— faster compilation than LLVM at -O0, while matching its runtime performance. In WebAssembly and database JIT scenarios, end-to-end compilation latency is significantly reduced.

Technology Category

Machine Learning: Hardware-aware MLSearch and Optimization: Sampling/Simulation-based SearchCognitive Modeling & Cognitive Systems: Agent Architectures

Application Category

Search and Retrieval-Augmented AI: Multilingual and cross-lingual Web searchSystems and Infrastructure for Web, Mobile and WoT: Applied ML and AI for Web-based mobile applicationsUser Modeling, Personalization and Recommendation: Large Language Models (LLM) for user modeling and recommendation
πŸ“ Abstract
Fast machine code generation is especially important for fast start-up just-in-time compilation, where the compilation time is part of the end-to-end latency. However, widely used compiler frameworks like LLVM do not prioritize fast compilation and require an extra IR translation step increasing latency even further; and rolling a custom code generator is a substantial engineering effort, especially when targeting multiple architectures. Therefore, in this paper, we present TPDE, a compiler back-end framework that adapts to existing code representations in SSA form. Using an IR-specific adapter providing canonical access to IR data structures and a specification of the IR semantics, the framework performs one analysis pass and then performs the compilation in just a single pass, combining instruction selection, register allocation, and instruction encoding. The generated target instructions are primarily derived code written in high-level language through LLVM's Machine IR, easing portability to different architectures while enabling optimizations during code generation. To show the generality of our framework, we build a new back-end for LLVM from scratch targeting x86-64 and AArch64. Performance results on SPECint 2017 show that we can compile LLVM-IR 8--24x faster than LLVM -O0 while being on-par in terms of run-time performance. We also demonstrate the benefits of adapting to domain-specific IRs in JIT contexts, particularly WebAssembly and database query compilation, where avoiding the extra IR translation further reduces compilation latency.
Problem

Research questions and friction points this paper is trying to address.

Fast machine code generation for low-latency JIT compilation
Eliminating extra IR translation steps in compiler frameworks
Simplifying multi-architecture support in custom code generators
Innovation

Methods, ideas, or system contributions that make the work stand out.

Adapts to existing SSA form code representations
Performs compilation in just one single pass
Uses high-level language for target instruction generation
πŸ”Ž Similar Papers
No similar papers found.
πŸ’Ό Related Jobs
No related jobs found.
T
Tobias Schwarz
Technical University of Munich, Germany
T
Tobias Kamm
Technical University of Munich, Germany
A
Alexis Engelke
Technical University of Munich, Germany