Skip to main content

Inline expansion: When and how?

  • Program Analysis
  • Conference paper
  • First Online:
Programming Languages: Implementations, Logics, and Programs (PLILP 1997)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1292))

Abstract

Inline function expansion is an optimization that may improve program performance by removing calling sequences and enlarging the scope of other optimizations. Unfortunately it also has the drawback of enlarging programs. This might impair executable programs performance. In order to get rid of this annoying effect, we present, an easy to implement, inlining optimization that minimizes code size growth by combining a compile-time algorithm deciding when expansion should occur with different expansion frameworks describing how they should be performed. We present the experimental measures that have driven the design of inline function expansion. We conclude with measurements showing that our optimization succeeds in producing faster codes while avoiding code size increase.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Appel. Compiling with continuations. Cambridge University Press, 1992.

    Google Scholar 

  2. A. Appel. Loop Headers in λ-calculus or CPS. Lisp and Symbolic Computation, 7:337–343, December 1994.

    Google Scholar 

  3. H. Baker. Inlining Semantics for Subroutines which are recursive. ACM Sigplan Notices, 27(12):39–46, December 1992.

    Google Scholar 

  4. C. Chambers. The Design and Implementation of the SELF Compiler, an Optimizing Compiler for Object-Oriented Programming Languages. Technical report stan-cs-92-1240, Stanford University, Departement of Computer Science, March 1992.

    Google Scholar 

  5. K. Cooper, M. Hall, and L. Torczon. Unexpected Side Effects of Inline Substitution: A Case Study. ACM Letters on Programming Languages and Systems, 1(1):22–31, 1992.

    Google Scholar 

  6. J. Davidson and A. Holler. Subprogram Inlining: A Study of its Effects on Program Execution Time. IEEE Transactions on Software Engineering, 18(2):89–101, February 1992.

    Google Scholar 

  7. J. Dean and C. Chambers. Towards Better Inlining Decisions Using Inlining Trials. In Conference on Lisp and Functional Programming, pages 273–282, Orlando, Florida, USA, June 1994.

    Google Scholar 

  8. W. Hwu and P. Chang. Inline Function Expansion for Compiling C Programs. In Conference on Programming Language Design and Implementation, Portland, Oregon, USA, June 1989. ACM.

    Google Scholar 

  9. IEEE Std 1178-1990. IEEE Standard for the Scheme Programming Language. Institute of Electrical and Electronic Engineers, Inc., New York, NY, 1991.

    Google Scholar 

  10. S. Jagannathan and A. Wright. Flow-directed Inlining. In Conference on Programming Language Design and Implementation, Philadelphia, Penn, USA, May 1996.

    Google Scholar 

  11. R.W. Scheifler. An Analysis of Inline Substitution for a Structured Programming Language. CACM, 20(9):647–654, September 1977.

    Google Scholar 

  12. M. Serrano. Bigloo user's manual. RT 0169, INRIA-Rocquencourt, France, December 1994.

    Google Scholar 

  13. M. Serrano and P. Weis. 1 + 1 = 1: an optimizing Caml compiler. In ACM SIGPLAN Workshop on ML and its Applications, pages 101–111, Orlando (Florida, USA), June 1994. ACM SIGPLAN, INRIA RR 2265.

    Google Scholar 

  14. R. Stallman. Using and Porting GNU CC. for version 2.7.2 ISBN 1-882114-66-3, Free Software Foundation, Inc., 59 Temple Place — Suite 330, Boston, MA 02111-1307, USA, November 1995.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Hugh Glaser Pieter Hartel Herbert Kuchen

Rights and permissions

Reprints and permissions

Copyright information

© 1997 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Serrano, M. (1997). Inline expansion: When and how?. In: Glaser, H., Hartel, P., Kuchen, H. (eds) Programming Languages: Implementations, Logics, and Programs. PLILP 1997. Lecture Notes in Computer Science, vol 1292. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0033842

Download citation

  • DOI: https://doi.org/10.1007/BFb0033842

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-63398-3

  • Online ISBN: 978-3-540-69537-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics