Globally inline a callee with high cost-effectiveness on the basis only of profile information in a call graph
Abstract
A mechanism is provided to globally inline a callee with high cost-effectiveness on the basis only of profile information in a call graph, without looking through all call-graph edges. The mechanism provides a technique for inlining. An inline cost-effectiveness ratio for the callee reachable from a caller to be compiled is calculated. Calculating the inline cost-effectiveness ration includes using a ratio of a frequency of calls to the callee to a total of call frequencies as effectiveness and using a ratio of a code size of the callee to a total size of inlinable code as cost. A determination is made as to whether to inline the callee by comparing the inline cost-effectiveness ratio with a predetermined threshold. The callee is inlined into a source code in response to determining that the callee method is to be inlined.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 16 · Forward citations: 2.
Claims (2 — 2 Independent, 0 Dependent)
- Claim 1Independent Claim
A method, executed by a computer, for inlining, comprising: calculating, by a processor in the computer, an inline cost-effectiveness ratio for a callee reachable from a caller to be compiled, wherein calculating the inline cost-effectiveness ratio includes using a ratio of a frequency of calls to the callee to a total of frequencies of calls as effectiveness in the inline cost-effectiveness ratio, and using a ratio of a code size of the callee to a total size of inlinable code as cost in the inline cost-effectiveness ratio; determining, by the processor in the computer, whether to inline the
- Claim 2Independent Claim
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (2 of 2 total)
References Cited — Backward Prior Art (16)
Non-Patent Literature (5)
- Arnold, Matthew et al., "A Comparative Study of Static and Dynamic Heuristics for Inlining", ACM SIGPLAN Workshop on Dynamic and Adaptive Compilation and Optimization (DYNAMO'00), Jan. 2000, 18 pages.
- Boehm, Omer et al., "Aggressive Function Inlining with Global Code Reordering", IBM Corporation, IBM Research Report, Computer Science H-0247 (H0611-009), Nov. 15, 2006, 26 pages.
- Cavazos, John et al., "Automatic Tuning of Inlining Heuristics", Proceedings of the 2005 ACM/IEEE SC Conference (SC'05), Seattle, Washington, Nov. 12-18, 2005, 11 pages.
- Chakrabarti, Dhruva R. et al., "Inline Analysis: Beyond Selection Heuristics", Proceedings of the International Symposium on Code Generation and Optimization (CGO'06), New York, New York, Mar. 26-29, 2006, 12 pages.
- Chang, Pohua P. et al., "Profile-guided Automatic Inline Expansion for C Programs", Software-Practice and Experience, vol. 22(5), Received Apr. 15, 1991, Revised Nov. 1991, Published May 1992, 21 pages.