Hasty Briefsbeta

Using the TPDE Codegen Back End in LLVM Orc

4 hours ago
  • #TPDE
  • #LLVM
  • #JIT Compilation
  • TPDE is a single-pass compiler backend for LLVM, open-sourced by TUM researchers, supporting LLVM 19 and 20.
  • TPDE is ideal for low-latency code generation in JIT compilers, especially within LLVM's ORC framework.
  • Integration of TPDE into LLVM ORC involves overriding the `CreateCompileFunction` to use TPDECompiler.
  • TPDE supports ELF-based systems and 64-bit Intel and ARM architectures (x86_64 and aarch64).
  • A fallback to LLVM's built-in backend is necessary for unsupported features like vector operations.
  • Concurrent compilation support in ORC JIT can be enabled by making TPDECompiler thread-local and guarding buffer access.
  • Performance improvements include a 4x speedup in compile-time with TPDE compared to LLVM's built-in backend.
  • The example demonstrates compiling 100 modules in parallel, reducing compile-time significantly with 8 threads.