Dynamic dispatch of context-sensitive optimizations
Gabriel Poesia, Fernando Magno Quintão Pereira
Abstract
Academia has spent much effort into making context-sensitive analyses practical, with great profit. However, the implementation of context-sensitive optimizations , in contrast to analyses, is still not practical, due to code-size explosion. This growth happens because current technology requires the cloning of full paths in the Calling Context Tree. In this paper, we present a solution to this problem. We combine finite state machines and dynamic dispatching to allow fully context-sensitive specialization while cloning only functions that are effectively optimized. This technique makes it possible to apply very liberal optimizations, such as context-sensitive constant propagation, in large programs—something that could not have been easily done before. We demonstrate the viability of our idea by formalizing it in Prolog, and implementing it in LLVM. As a proof of concept, we have used our state machines to implement context-sensitive constant propagation in LLVM. The binaries produced by traditional full cloning are 2.63 times larger than the binaries that we generate with our state machines. When applied on Mozilla Firefox, our optimization increases binary size from 7.2MB to 9.2MB. Full cloning, in contrast, yields a binary of 34MB.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext d993288d-7745-4f7e-8733-337b0bf9ed16Cited by top-tier papers2
- Combining Structured Static Code Information and Dynamic Symbolic Traces for Software Vulnerability PredictionHuanting Wang, Zhanyong Tang, Shin Hwei Tan, Jie Wang et al.ICSE 2024 · 15 citations
- Jasmine: A Static Analysis Framework for Spring Core TechnologiesMiao Chen, Tengfei Tu, Hua Zhang, Qiaoyan Wen et al.ASE 2022 · 9 citations
Builds on1
Related papers
- Challenging Sequential Bitstream Processing via Principled Bitwise SpeculationJunqiao Qiu, Lin Jiang, Zhijia ZhaoASPLOS 2020 · 9 citations
- Hybrid Inlining: A Framework for Compositional and Context-Sensitive Static AnalysisJiangchao Liu, Jierui Liu, Peng Di, Diyu Wu et al.ISSTA 2023 · 3 citations
- CoSSJIT: Combining Static Analysis and Speculation in JIT CompilersAditya Anand, Vijay Sundaresan, Daryl Maier, Manas ThakurOOPSLA 2025 · 4 citations
- Predictive Context-sensitive FuzzingPietro Borrello, Andrea Fioraldi, Daniele Cono D'Elia, Davide Balzarotti et al.NDSS 2024
- PUS: A Fast and Highly Efficient Solver for Inclusion-based Pointer AnalysisPeiming Liu, Yanze Li, Bradley Swain, Jeff HuangICSE 2022 · 3 citations
