CacheIR: The Benefits of a Structured Representation for Inline Caches
summary
CacheIR is an IR for inline caches that stores dynamic data in stub fields so native code can be reused across different stubs; the engine generates linear stub chains ending in a C++ fallback and compiles them into machine code, enabling monomorphic IC lowering and trial inlining (per-callsite private ICs). WarpBuilder lowers CacheIR into a top-tier JIT, adds stub folding and bailout-loop detection, reduces memory/metadata overhead and speeds warm-up, and produces measurable gains on Speedometer while initially regressing on JetStream before targeted improvements.
AI-written summary · about
chapters (14)
- 0:00CacheIR and inline caching intro
- 1:46Traditional inline cache limits
- 2:29SpiderMonkey’s cache architecture
- 3:36Why CacheIR was introduced
- 5:44Advantages of intermediate representation
- 6:45WarpBuilder JIT on CacheIR
- 7:27WarpBuilder optimization with CacheIR
- 9:59WarpBuilder vs IonBuilder benefits
- 11:01Peak performance vs warm-up trade-offs
- 11:21CacheIR trial inlining
- 13:08Stub folding and bailout detection
- 13:51Benchmark improvements results
- 14:54Future research opportunities
- 15:14Q&A
related talks
16mIRHash: Efficient Multi-Language Compiler Caching by IR-Level Hashing
27mCachet: A Domain-Specific Language for Trustworthy Just-In-Time Compilers
27mR Melts Brains -- An IR for First-Class Environments and Lazy Effectful Arguments
26mAn Analysis of Compiled Code Reusability in Dynamic Compilation
16mHidden Inheritance: An Inline Caching Design for TypeScript Performance
15mAutomatically Reasoning About How Systems Code Uses the CPU Cache
30mThe Solidity Optimizooooor
31mBuilding optimising compiler for Dart
