Scalable cross-file inlining through locality-based transformation ordering
Abstract
One embodiment disclosed relates to a method of compiling a computer program from a plurality of files of source code. An inline analysis determines which call sites in the plurality of files to make inline. An inline transformation performs the inlining within currently opened files. The transformer dynamically determines the order of inlines independent of the analyzer by taking into account the disk input-output pressure during compilation. The resulting inline order minimizes the input and output of files from and to disk respectively by considering the inline affinity between files and maintains the best run-time performance by preserving the dependences between call sites. During the inline transformation, a determination of which files to open and close is made in dependence on an affinity weighting between the files. The affinity and the dependence relationships are continuously updated in order to generate the best transformation ordering among call sites that ensures compile-time scalability and improved run-time performance.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 14 · Forward citations: 24.
Claims (2 — 2 Independent, 0 Dependent)
- Claim 1Independent Claim
A method of cross-file inlining during compilation of a program, wherein which files to open and close is determined based on affinity weightings between the files, wherein the affinity weightings depend on call sites and a related number of potential inlines between the files, the method comprising: performing an iterative process including (i) choosing an edge in an inline affinity graph with a highest affinity weighting, (ii) retrieving and opening source files corresponding to the chosen edge, (iii) allowing inlines to proceed between the opened source files subject to inline dependencies
- Claim 2Independent Claim
A method o
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 24 total)
References Cited — Backward Prior Art (14)
Non-Patent Literature (5)
- 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.
- Chang, Pohua P; Mahlke, Scott A; Chen, William Y; Hwu, Wen-Mei W; "Profile guided Automatic Inline Expansion for C Programs", p. 349-369, Software Practice and Experience, vol. 22(5), May 1992, retrieved Jun. 18, 2007.
- Chen, William Y; Chang, Pohua P; Conte, Thomas M; Hwu, Wen-mei W; "The Effect of Code Expanding Optimizations on Instruction Cache Design", p. 1-36, 1992, retrieved from citeseer.com on Jun. 18, 2007.
- Dolby, Julian; Chien, Andrew A; "An Evaluation of Automatic Object Inline Allocation Techniques", p. 1-20, 1998 ACM retrieved Feb. 5, 2007.