Cross-file inlining by using summaries and global worklist
Abstract
One embodiment disclosed relates to a method of compiling a computer program. A plurality of modules of source code is received, and intermediate representations corresponding to the modules are generated. A set of data from the intermediate representations is extracted to create an inliner summary for each module. Using the inliner summaries and a globally-sorted working-list based order, an inline analysis phase determines which call sites in the modules are to be inlined by substituting code from a called module. The propagation of summaries may be done elaborately, potentially throughout the call-graph. The goodness of call sites may be computed with a view to comparing them and ordering them in a descending order of goodness. Applicants believe the compile-time effectiveness lies in the ability to work consistently with summary information in the inline analysis phase without having to touch the intermediate representation, while maintaining a high degree of run-time performance by continuously updating the summary information.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 7 · Forward citations: 27.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method of compiling a computer program, the method comprising: receiving a plurality of modules of source code; generating intermediate representations corresponding to the modules; extracting a set of data from the intermediate representations to create an inliner summary for each module; using the inliner summaries and a globally-sorted working-list based order in an inline analysis phase, without using the intermediate representations in the inline analysis phase, to determine which call sites in the modules are to be inlined by substituting code from a called module, wherein said globall
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 27 total)
References Cited — Backward Prior Art (7)
Non-Patent Literature (5)
- Aggressive Inlining, Ayers et al., 1997 ACM pp. 134-145.
- Andrew Ayers, et al., "Aggressive InLining", ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 1997, pp. 134-145.
- Andrew Ayers, et al., "Scalable Cross-Module Optimization", ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI),1998, pp. 301-312.
- Ayers et al., "Aggressive Inlining", 1997, ACM, pp. 134-145.
- J. Eugene Ball, "Predicting the Effects of Optimization on a Procedure Body", ACM SIGPLAN, 1979, pp. 214-220.