Programmatic compiler optimization of glacial constants
Abstract
Optimizations are programmatically applied by a compiler (preferably, a just-in-time or “JIT” compiler), and enable achieving improved performance while a variable acts as a global constant, yet also allow code to execute correctly if the global constant's run-time value changes from the value on which the optimization was originally based. Code snippets that dynamically patch executable code are described, where these code snippets take corrective actions to enable correct program execution following a run-time change to the value of a glacial constant. A backup recovery path may also be maintained, where this path provides code that is executed in the event of a change to a glacial constant and that treats the glacial constant as a variable. Recompilation may also be used after a change to a glacial constant, where the originally-compiled code has made an assumption about the glacial constant's value that is no longer accurate. Combinations of these approaches may be used.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 36 · Forward citations: 25.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer-implemented method of optimizing compiler-generated code, comprising: for each of at least one selected variable for which a value thereof will be used as a glacial constant in the compiler-generated code, creating optimized compiler-generated code from source code for each of at least one method that references the selected variable, wherein the optimized compiler-generated code uses the value as the glacial constant by generating the code as if the value is a particular constant value for that selected variable; and providing a programmatic run-time adjustment capability for progr
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 25 total)
References Cited — Backward Prior Art (36)
Non-Patent Literature (5)
- Autrey and Wolfe, "Initial Results for Glacial Variables Analysis", 1998, International Journal of Parallel Programming, vol. 26, No. 1, pp. 43-64.
- Calder, et al. "Value Profiling and Optimization", 1999, Journal of Instruction-Level Parallelism, pp. 1-37.
- David Evans, "Lecture 12: Subtyping and Inheritance", University of Virginia, Oct. 2003: retrieved from "http://www.cs.virigina.edu/cs201/lectures/lecture12.ppt/" on Oct. 8, 2007.
- Frank Tip and Peter F. Sweeney, "Class Hierarchy Specialization", 1997 ACM, pp. 271-281.
- Kevin A. Stoodley et al., U.S. Appl. No. 09/867,362, filed May 29, 2001, Examiner's Interview Summary, Oct. 26, 2006, 1 page.