skip to main content
article
Free Access

Aggressive inlining

Authors Info & Claims
Published:01 May 1997Publication History
Skip Abstract Section

Abstract

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.

References

  1. 1 F. C. Allen and J. Cocke. A catalogue of optimizing transformations. In Design and Optimization of Compilers, R. Ruskin, Ed., Prentice-Hall, Englewood Cliffs, N J, 1971, 1-30.Google ScholarGoogle Scholar
  2. 2 R. Allen and S. Johnson. Compiling C for vectorization, parallelization, and inline expansion. Proceedings of the A CM SIGPLAN '88 Conference on Programming Language Design and Implementation, 241-249. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3 J. Ball. Predicting the effects of optimization on a procedure body. A CM SIGPLAN Notices lj(8), 214-220, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4 P. Carini. Automatic Inlining. IBM Research Report RC 20286, November 1995.Google ScholarGoogle Scholar
  5. 5 P. P. Chang, S. A. Mahlke, W. Y. Chen, and W. W. Hwu. Profile-guided automatic inline expansion for C programs. Software Practice and Experience 22(5), 349-369, May 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6 K. D. Cooper, M. W. Hall, and K. Kennedy. A methodology for procedure cloning. Computer Languages, 19(2), 105-117, February 1993.Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7 J. W. Davidson and A. M. Holler. A study of a C function inliner. Software Practice and Experience 18(8), 775-790, August 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8 J. Dean and C. Chambers. Training compilers to make better inlining decisions. Technical Report 93-05-05, Department of Computer Science and Engineering, University of Washington, 1993.Google ScholarGoogle Scholar
  9. 9 A. M. Holler. Compiler optimizations for the PA- 8000. COMPCON 1997 Digest of Papers, February 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10 D. Hunt. Advanced performance features of the 64- bit PA8000. COMPCON 1995 Digest of Papers, 123-128, March 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11 W. W. Hwu and P. P. Chang. Inline function expansion for compiling C programs. Proceedings of the A CM SIGPLAN '89 Conference on Programming Language Design and Implementation, 246- 257. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12 K. Pettis and R. C. Hansen. Profile guided code positioning. In Proceedings of the A CM SIGPLAN '90 Conference on Programming Language Design and Implementation, 16-27. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13 S. Richardson and M. Ganapathi. Interprocedural analysis versus procedure integration. Information Processing Letters, 3~(3), 137-142, August 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14 R. W. Sehiefler. An analysis of inline substitution for a structured programming language. Communications of the A CM 20(9), 647-654, September 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15 S. E. Speer, R. Kumar, and C. Partridge. Improving UNIX Kernel Performance using Profile Based Optimization. In USENIX 199J Proceedings. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Aggressive inlining

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 32, Issue 5
            May 1997
            365 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/258916
            Issue’s Table of Contents
            • cover image ACM Conferences
              PLDI '97: Proceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation
              May 1997
              365 pages
              ISBN:0897919076
              DOI:10.1145/258915

            Copyright © 1997 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 1 May 1997

            Check for updates

            Qualifiers

            • article

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader