Guided Linking: Dynamic Linking without the Costs
summary
Guided Linking merges a developer-chosen optimized set into a single merged library (LLVM-based, using LTO+PGO), then uses developer-supplied constraints like NoOverride, NoUse, NoPlugin, NoWeak to avoid runtime indirection and enable optimizations such as inlining. Implemented with a function deduplication pass, it speeds Python by 9.2% on average (best 32%, 4 of 61 regressions), reduces 11 Boost versions’ ELF size by 57% and Protobuf by 31%, and makes a closed-config Clang build 5% faster and 13% smaller.
AI-written summary · about
chapters (15)
- 0:00Intro
- 0:11Motivating Example
- 2:13Problem #1
- 2:29Solution #1
- 3:28Problem #2
- 4:19Solution #2
- 5:26Optimized Set Possibilities
- 6:15Without Constraints
- 7:32Adding Constraints
- 8:37Specifying Constraints
- 10:27Python Example
- 11:27Size reductions
- 11:40Clang
- 12:59Future Work
- 13:52Conclusion
related talks
01h 02mThinLTO: Scalable and Incremental Link-Time Optimization
22mLinker Relaxation in LLD
52mDotty Linker: Precise Types Bring Performance
01h 23mC++ Linkers and the One Definition Rule
15mDuplo: A Framework for OCaml Post-Link Optimisation
06mProfile-Guided Optimization in the Go Compiler
15mNot So Fast: Understanding and Mitigating Negative Impacts of Compiler Optimizations on Code Reuse G
25mThe Road Not Taken: Exploring Alias Analysis Based Optimizations Missed by the Compiler
