ThinLTO: Scalable and Incremental Link-Time Optimization
summary
Whole-program optimization is implemented as ThinLTO inside LLVM: each .o emits a small summary, the linker builds a combined index, makes import/inlining decisions, and backends parallelize by importing only marked functions. Results: monolithic LTO once needed ~43 GB (later ~11 GB) and is ~4× slower for clang; ThinLTO’s thin link runs in seconds, a one-file incremental rebuild hits cached backends or compiles in 16 seconds, Chromium monolithic LTO ~28 minutes while ThinLTO scales like O2 and works with Bazel and distributed builds.
AI-written summary · about
chapters (13)
- 0:00Intro
- 1:01Traditional Compilation
- 2:10LLVM LTO: in a Nutshell
- 5:41Example
- 7:29Monolithic LTO: No Free Lunch!
- 9:39ThinLTO: Design
- 22:49ThinLTO WFA Complio Time Opomization Weak Linkage Resolution
- 25:13ThinLTO WPA: Dead Global Pruning
- 26:49Profile Guided Optimization (PGO)
- 33:50Serial Step Comparisons
- 38:34Performance: Memory Consumption vs Paralelism
- 42:15Implications for C++ Developers
- 45:23Future Work
related talks
30mLet's talk about Link-Time Optimization (LTO)
23mChallenges with Kernels built with LTO
48mGCC Link Time Optimization and the Linux Kernel
01h 04mJust-in-Time Compilation: The Next Big Thing?
15mDuplo: A Framework for OCaml Post-Link Optimisation
14mGuided Linking: Dynamic Linking without the Costs
52mDotty Linker: Precise Types Bring Performance
19mExploiting Undefined Behavior in C/C++ Programs for Optimization: A Study on the(…)
