Constant return optimization transforming indirect calls to data fetches
Abstract
Indirect method invocation of methods that only return constant values is optimized using fetching operations and return constant tables. Such method calls can be optimized if all possible method calls via the call site instruction return a constant value and have no side effects. Each constant return value is loaded from a return constant table, and method invocation is eliminated. If all possible target methods in a program result in a constant return value and have no side effects, an associated virtual function dispatch table (vtable) may be used as the return constant table. Furthermore, control operation optimization may be applied to identify type constraints, based on one or more possible type-dependent constant return values from an indirect method invocation. An optimizer identifies and maps between a restricted set of values and an associated restricted set of types on which execution code may operate relative to a given control operation. The type constraints are used to optimize the associated execution code by filtering propagation of runtime type approximations for optimization.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 9 · Forward citations: 20.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer program product including at least one tangible medium encoding an object-oriented computer program for executing on a computer system a computer process for optimizing indirect method calls, the indirect method call being programmed to call a target method of a plurality of possible target methods that return constant values the computer process comprising: determining the association between the indirect method call and a receiver object and between the indirect method call and a target method; determining the association between the target method and a return constant value and b
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 20 total)
References Cited — Backward Prior Art (9)
Non-Patent Literature (5)
- "Chapter 10: Virtual Methods", http://topaz.cs.byu.edu/cs431/doc/Textbook/Chapter10/, 21 pages.
- "SableVM: A Research Framework for the Efficient Execution of Java Bytecode", Sable Technical Report No. 2000-3, by Gagnon et al., Nov. 2000.
- Bacon, Graham, and Sharp, "Compiler Transformations for High-Performance Computing", Dec. 1994, ACM Computing Surveys, Volumn 26, No. 4, pp. 345-420.
- Brad Calder, Dirk Grunwald , "Reducing indirect function call overhead in C++ programs", 1994, Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, ISBN:0-89791-636-0, pp.: 397-408.
- Bradley M. Kuhn, David W. Binkley, "An enabling optimization for C++ virtual functions", Feb. 1996, Proceedings of the 1996 ACM symposium on Applied Computing, pp. 420-428.