RIFS: Run-time Invariant Function Specialization
Compilers apply optimizations such as function specialization and constant propagation to eliminate redundant work at compile time. However, because compilers must prove that values are constant, many profitable optimization opportunities remain unrealized. In this paper, we propose run-time invariant function specialization (RIFS), a profile-guided compiler technique that specializes functions based on runtime invariant call-site-specific argument values. RIFS introduces a novel value-profiling LLVM pass to identify runtime invariant arguments, even though they cannot be proven constant statically. A subsequent LLVM transformation pass generates specialized function variants tailored to these value profiles. To efficiently select among potentially thousands of specialization candidates, we develop a predictive cost model that estimates the performance benefit of each candidate prior to code generation. We integrate our passes seamlessly into the existing PGO-enabled LLVM toolchain. We evaluate RIFS across 12 real-world applications, demonstrating substantial improvements over state-of-the-art optimization techniques. RIFS achieves an average speedup of 5.3% and an instruction reduction of 2.5% over the LLVM -O3+PGO baseline.
Sat 31 JanDisplayed time zone: Hobart change
11:00 - 12:45 | |||
11:00 26mTalk | GraalMHC: ML-Based Method-Hotness Classification for Binary-Size Reduction in Optimizing Compilers Main Conference Milan Cugurovic Oracle and University of Belgrade, Aleksandar Prokopec Oracle Labs, Boris Spasojevic Oracle Labs, Zurich, Switzerland, Vojin Jovanovic Oracle Labs, Milena Vujosevic Janicic University of Belgrade and Oracle | ||
11:26 26mTalk | It’s about Time - Temporal Abstractions for Asynchronous GPU Tensor Computations Main Conference | ||
11:52 26mTalk | Optimizing Sparse Tensor Compilation for Sparse Output Main Conference Shideh Hashemian University of Edinburgh, Michael F. P. O'Boyle University of Edinburgh, Amir Shaikhha University of Edinburgh | ||
12:18 26mTalk | RIFS: Run-time Invariant Function Specialization Main Conference Saba Jamilan University of California, Santa Cruz, Snehasish Kumar Google LLC, Heiner Litz UC Santa Cruz | ||