IRHash: Efficient Multi-Language Compiler Caching by IR-Level Hashing
summary
IRHash implements IR-level hashing as an LLVM pass that stores/retrieves object files by hashing the generated IR, supporting any language with an LLVM backend. Evaluated on 16 projects across C, C++, Fortran, and Haskell, it achieves a 19% average build time reduction on C projects (12–53% overall), precision near 100% versus ccache/cHash, and overhead below 1% (two orders of magnitude less than ccache). The prototype is compact at 600 lines of code and consistently outperforms existing caches.
AI-written summary · about
chapters (10)
- 0:00Compiler caching challenges
- 1:22Traditional cache limits
- 3:07Introducing IR-level compilation caching
- 6:43Why IR for caching
- 8:08IRHash implementation
- 9:13Experimental setup
- 10:40Performance results
- 12:30Precision and overhead
- 14:37IRHash benefits and future work
- 15:38Q&A
related talks
20mCacheIR: The Benefits of a Structured Representation for Inline Caches
48mCross-Domain Compilation: Exploiting Synergies Across the CS Community
26mAn Analysis of Compiled Code Reusability in Dynamic Compilation
46mIR JIT Framework: the base for the next generation of JIT in PHP
06mLightning Talk: Remote Execution Caching Compiler (RECC) for C++ Builds
30mRICE: An Optimizing Curry Compiler
22mReconciling High-level Optimizations and Low-level Code in LLVM
27mR Melts Brains -- An IR for First-Class Environments and Lazy Effectful Arguments
