# TPDE-LLVM for 10-20x faster -O1 compilation

**URL:** https://discourse.julialang.org/t/tpde-llvm-for-10-20x-faster-o1-compilation/132074
**Category:** Internals & Design
**Created:** [September 3, 2025, 2:09pm UTC](https://discourse.julialang.org/t/tpde-llvm-for-10-20x-faster-o1-compilation/132074 "2025-09-03T14:09:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![RomeoV](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/romeov/32/37687_2.png) [@RomeoV](https://discourse.julialang.org/u/RomeoV)
#### Post date: [September 3, 2025, 2:09pm UTC](https://discourse.julialang.org/t/tpde-llvm-for-10-20x-faster-o1-compilation/132074/1 "2025-09-03T14:09:51Z")

</div>

I just saw [this post](https://news.ycombinator.com/item?id=45072481) on hackernews, where an [LLVM compiler backend](https://discourse.llvm.org/t/tpde-llvm-10-20x-faster-llvm-o0-back-end/86664) ([github](https://github.com/tpde2/tpde)) was posted that claims to get 10-20x compile time speedup compared to an LLVM 19 baseline.

Quoting from the linked LLVM-Discourse thread:

> **How to use TPDE-LLVM?**
> 
> The LLVM back-end is usable as a library (e.g., for JIT compilation, also usable with ORC JIT), as `llc`-like tool, and can be integrated in Clang (needs a patch, plugins can’t provide a custom back-end right now). Some more details [here](https://docs.tpde.org/tpde-llvm-main.html).

So I am wondering if it would be possible to compile Julia with this LLVM backend, at least for use-cases for which O0 or O1 type performance is acceptable.

I don’t know too much about how exactly LLVM is currently called from Julia, but quoting the [TPDE-LLVM docs](https://docs.tpde.org/tpde-llvm-main.html):

> Library usage is possible through [tpde\_llvm::LLVMCompiler](https://docs.tpde.org/classtpde__llvm_1_1LLVMCompiler.html), which supports compiling a module to an object file or mapping it into the memory of the current process for JIT execution. The JIT mapper only supports very typical ELF constructs (e.g., no TLS), if this is not sufficient, the object file can also be mapped through LLVM’s ORC JIT (see tpde-llvm/tools/tpde-lli.cpp for an example).

Perhaps someone can comment on the feasibilty here.

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [September 3, 2025, 2:13pm UTC](https://discourse.julialang.org/t/tpde-llvm-for-10-20x-faster-o1-compilation/132074/2 "2025-09-03T14:13:45Z")

</div>

> [@TPDE: A Fast Adaptable Compiler Back-End Framework](https://discourse.julialang.org/t/tpde-a-fast-adaptable-compiler-back-end-framework/129576):
>
> Researchers from the Technical University of Munich (TUM) have announced TPDE as a fast and adaptable compiler back-end framework. I wonder if it could be useful to Julia in the future.

---

<div class="post-metadata">

### Author: ![RomeoV](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/romeov/32/37687_2.png) [@RomeoV](https://discourse.julialang.org/u/RomeoV)
#### Post date: [September 3, 2025, 2:15pm UTC](https://discourse.julialang.org/t/tpde-llvm-for-10-20x-faster-o1-compilation/132074/3 "2025-09-03T14:15:30Z")

</div>

Thanks for linking this, I didn’t see that post. The feasibility question isn’t really resolved in that thread either, though. Happy to continue the discussion there though.

---

<div class="post-metadata">

### Author: ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)
#### Post date: [September 3, 2025, 2:20pm UTC](https://discourse.julialang.org/t/tpde-llvm-for-10-20x-faster-o1-compilation/132074/4 "2025-09-03T14:20:16Z")

</div>


