Methods and apparatus for dynamic register scratching
Abstract
Apparatus and methods of reducing dynamic memory stack by a register stack engine are disclosed. An example apparatus and method identifies a local parameter of a caller function. A scratch register corresponding to the local parameter is moved to the top of a register stack, and a local parameter of a callee function is assigned to the scratch register.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 9 · Forward citations: 6.
Claims (2 — 1 Independent, 1 Dependent)
- Claim 1Independent Claim
A method comprising: identifying a local parameter of a caller function to be a scratch register candidate; identifying an out parameter of the caller function in an out parameter register on a register stack; moving the scratch register candidate higher in the register stack than the out parameter register; moving a second local parameter of the caller function in a preserved register to the bottom of the register stack; assigning an in parameter of a callee function to the out parameter register; and assigning a local parameter of the callee function to the scratch register candidate, wherei
- Claim 2Depends on #1
The method of claim 1 further comprising: reading a plurality of instructions including the caller function and the callee function; and determining a live range from
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (6 of 6 total)
References Cited — Backward Prior Art (9)
Non-Patent Literature (5)
- Adl-Tabatabai,,Ali-Reza , Fast Effective Code generation in a Just in Time Java Compiler, 1998, ACM pp. 280-290.
- Briggs, P, etal. Improvements to Graph Coloring Register Allocation 1994, ACM, p. 428-455.
- Chow, F.C., etal., Priority-Based Coloring Approach to Register Allocation, 1990, ACM, ACM transactions on Programming Languages and Systems, vol. 12, No. 4, pp. 501-536.
- Davidson ,Jack W. etal, Methods for Saving and Restoring Register Values across Function Calls, Feb. 1991, Software-Practice and Experience, John Wiley & Sons, Ltd vol. 21(2) pp. 149-165.
- Goodman, J.R. etal., Code Scheduling and Register Allocation in Large Basic Blocks, 1988, ACM, pp. 442-452.