Aggressive inlining
Andrew Ayers, Richard Schooler, Robert X. Gottlieb · Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation · 1997
Existing research understates the benefits that can be obtained from inlining and cloning, especially when guided by profile information. Our implementation of inlining and cloning yields excellent results on average and very rarely lowers performance. We believe our good results can be explained by a number of factors: inlining at the intermediate-code level removes most technical restrictions on what can be inlined; the ability to inline across files and incorporate profile information enables us to choose better inline candidates; a high-quality back end can exploit the scheduling and register allocation opportunities presented by larger subroutines; an aggressive processor architecture benefits from more predictable branch behavior; and a large instruction cache mitigates the impact of code expansion. We describe the often dramatic impact of our inlining and cloning on performance: for example, the implementations of our inlining and cloning algorithms in the HP-UX 10.20 compilers boost SPECint95 performance on a PA8000-based workstation by a factor of 1.32.
Cited by 89 works. doi:10.1145/258915.258928 Open-access PDF
Authors
References
- Profile guided code positioning
- Advanced performance features of the 64-bit PA-8000
- Profile guided code positioning
- An analysis of inline substitution for a structured programming language
- Inline function expansion for compiling C programs
- Profile‐guided automatic inline expansion for C programs
- A methodology for procedure cloning
- Compiling C for vectorization, parallelization, and inline expansion
- Predicting the effects of optimization on a procedure body
- A study of a C function inliner