Eliminating store/restores within hot function prolog/epilogs using volatile registers
Abstract
A post-link optimization method for renaming non-volatile registers with unused volatile registers, then removing the non-volatile register store/restore instructions from a function prolog/epilog. The volatile registers are saved before each function call and restored immediately afterwards. The optimization method is worthwhile if all of the call instructions are rarely invoked relative to the function prolog/epilog. The method requires that the hot function be disassembled, but does not require the full control flow graph.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 11 · Forward citations: 15.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer-implemented method for code optimization, comprising: disassembling object code that has been compiled and linked; analyzing the disassembled code so as to identify a first function in the code, the first function including store and restore instructions with respect to one or more non-volatile registers and further including a call instruction to a second function, which second function is performed infrequently when the first function is run; identifying one or more volatile registers unused in the first function; and modifying the code so as to replace each reference in the first
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 15 total)
References Cited — Backward Prior Art (11)
Non-Patent Literature (5)
- Aho et al., "Compilers, Principles, Techniques and Tools", Addison-Wesley, 1986, p. 585-722.
- Amitabh Srivastava and David Wall, "A Practical System for Intermodule Code Optimization at Link-Time", WRL Research Report 92/6, Dec. 1992.
- Ealan Henis et al, "Feedback Based Post-link Optimization for Large Subsystems", Second Workshop on Feedback Directed Optimization, Nov. 1999, Haifa, Israel, pp. 13-20.
- Gadi Haber et al, "Reliable Post-link Optimizations Based on Partial Information", Proceedings of Feedback Directed and Dynamic Optimizations Workshop 3, Dec. 2000, Monterey, California, pp. 91-100.
- Milo Martin, et al, Exploiting Dead Value Information:, Published in Proceedings of MICRO-30, Dec. 1-3, 1997, Research Triangle Park, North California, pp. 1-11.