This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Subprogram Inlining: A Study of its Effects on Program Execution Time
February 1992 (vol. 18 no. 2)
pp. 89-102

Equations representing the execution time performance of noninlined and inlined versions of a program have been developed. The accuracy of the equations' description of inlined program execution time behavior was demonstrated on four computer systems. Using the equations, understanding of how certain factors influence the speed of inlined code was gained. Contrary to a number of published reports in the literature, the increased size of inlined code was not found to affect its execution time performance on demand-paged virtual memory machines. On such systems, neither the use of an inlining algorithm that includes program size constraints nor the substitution of interprocedural data flow analysis for inlining is warranted. A modest improvement in the caching and paging behavior of test programs' inlined versions was also observed

[1] S. Richardson and M. Ganapathi, "Interprocedural analysis versus procedure integration," Inform. Proc. Lett., vol. 32, pp. 137-142, 1989.
[2] J. W. Davidson and A. M. Holler, "A study of a C function inliner,"Software Prac. Exper., vol. 18, pp. 775-790, 1988.
[3] F. C. Chow, "A portable machine-independent global optimizer-design and measurements," Stanford Univ., Tech. Rep. 83-254, 1983.
[4] M. L. Powell, "A portable optimizing compiler for Modula-2,"SIGPLAN Not., vol. 19, vol. 6, pp. 310-318, 1984.
[5] M. E. Benitez, "A global object code optimizer," Masters thesis, Univ. Virginia, 1989.
[6] B. Schwarz, W. Kirchgassner, and R. Landwehr, "An optimizer for Ada--design, experiences, and results,"SIGPLAN Not., vol. 23, no. 7, pp. 175-184, 1988.
[7] M. S. Johnson and T. C. Miller, "Effectiveness of a machine-level, global optimizer,"SIGPLAN Not., vol. 21, no. 7, pp. 99-108, 1986.
[8] W. Harrison, "A new strategy for code generation--the general purpose optimizing compiler," inProc. 4th ACM Symp. on Prin. of Program. Languages, 1977, pp. 29-37.
[9] C. A. Huson, "An in-line subroutine expander for Parafrase," Univ. Illinois, Urbana-Champaign, Tech. Rep. UIUCDCS-R-82-1118, 1982.
[10] R. Allen and S. Johnson, "Compiling C for vectorization, parallelization, and inline expansion,"SIGPLAN Not., vol. 23, no. 7, pp. 241-249, 1988.
[11] A. V. Aho, R. Sethi, and J. D. Ullman,Compilers: Principles, Techniques, and Tools. Reading, MA: Addison-Wesley, 1986.
[12] M. D. MacLaren, "Inline routines in VAXELN Pascal,"SIGPLAN Not., vol. 19, no. 6, pp. 266-275, 1984.
[13] A. M. Holler, "A study of the effects of subprogram inlining," Ph.D. thesis, Univ. Virginia, 1991.
[14] R. W. Scheifler, "An analysis of inline substitution for a structured programming language,"Commun. ACM, vol. 20, no. 9, pp. 647-654, 1977.
[15] J. E. Ball, "Predicting the effects of optimization on a procedure body,"SIGPLAN Not., vol. 14, no. 8, pp. 214-220, 1979
[16] W. W. Hwu and P. P. Chang, "Inline function expansion for compiling C Programs,"SIGPLAN Not., vol. 24, no. 7, pp. 246-257, 1989.
[17] F. C. Chow, "Minimizing register usage penalty at procedure calls,"SIGPLAN Not., vol. 23, no. 7, pp. 85-94, 1988.
[18] J. W. Davidson and D. B. Whalley, "Methods for saving and restoring register values across function calls," Dept. Computer Sci., Univ. Virginia, Tech. Rep. 89-11, 1989.
[19] R. A. Freiburghouse, "Register allocation via usage counts,"Commun. ACM, vol. 17, no. 11, pp. 638-642, 1974.
[20] G. J. Chaitinet al., "Register allocation via coloring,"J. Comput. Lang., vol. 6, pp. 47-57, 1981.
[21] G. J. Chaitin, "Register allocation and spilling via graph coloring,"SIGPLAN Not., vol. 17, no. 6, pp. 98-105, 1982.
[22] P. Briggs, K. D. Cooper, K. Kennedy, and L. Torczon, "Coloring heuristics for register allocation,"SIGPLAN Not., vol. 24, no. 7, pp. 275-284, 1989.
[23] F. Chow and J. Hennessy, "Register allocation by priority-based coloring,"SIGPLAN Not., vol. 19, no. 6, pp. 222-232, 1984.
[24] J. R. Larus and P. N. Hilfinger, "Register allocation in the SPUR Lisp compiler,"SIGPLAN Not., vol. 21, no. 7, pp. 255-263, 1986.
[25] H. E. Bal and A. S. Tanenbaum, "Language- and machine-independent global optimization on intermediate code,"J. Comput. Lang., vol. 11, no. 2, pp. 105-121, 1986.
[26] K.D. Cooper, K. Kennedy, and L. Torczon, "The impact of interprocedure analysis and optimization in theRnenvironment,"ACM Trans. Program. Lang. Syst., vol. 8, no. 4, pp. 491-523, Oct. 1986.
[27] M. W. Hall, "Interprocedural transformations in a programming environment," Ph.D. thesis proposal, Rice Univ., 1989.
[28] K. D. Cooper, M. Hall, and L. Torczon, "An experiment with inline substitution," Dept. Comput. Sci., Rice Univ., Rice Comput. Tech. Rep. 90-128, 1990.
[29] S. Laha, J. H. Patel, and R. K. Iyer, "Accurate low-cost methods for performance evaluation of cache memory systems,"IEEE Trans. Computers, vol. 37, no. 11, pp. 1325-1336, 1988.
[30] Stone, H. S. 1987.High-Performance Computer Architecture. Reading, Mass., Addison-Wesley.
[31] S. Richardson and M. Ganapathi, "Code optimization across procedures,"Computer, vol. 22, no. 2, pp. 42-50, 1989.
[32] A. Smith, "Cache Memories,"Computing Surveys, Vol. 14, No. 3, Sept. 1982, pp. 473- 530.
[33] J.L. Hennessy and David A. Patterson,Computer Architecture: A Quantitative Approach, Morgan Kaufmann, San Mateo, Calif., 1990.
[34] R. B. K. Dewar and M. Smosn,Microprocessors: A Programmer's View. New York: McGraw-Hill, 1990.
[35] W. W. Hwu and P. P. Chang, "Achieving high instruction cache performance with an optimizing compiler,"ACM SIGARCH Comput. Arch. News, vol. 17, no. 3, pp. 242-251, 1989.
[36] A. J. Smith, "Line (block) size choice for CPU cache memories,"IEEE Trans. Computers, vol. 36, no. 9, pp. 1063-1074, 1987.
[37] P. J. Denning, "Working sets past and present,"IEEE Trans. Software Eng., vol. SE-6, pp. 64-84, 1980.
[38] A. Tanenbaum,Operating Systems: Design and Implementation. Englewood Cliffs, NJ: Prentice-Hall, 1987.
[39] J. L. Peterson and A. Silberschaz,Operating Systems Concepts. Reading, MA: Addison-Wesley, 1986.
[40] S. E. Madnick and J. J. Donovan,Operating Systems. New York: McGraw-Hill, 1974.

Index Terms:
subprogram inlining; execution time performance; inlined versions; inlined program execution time behavior; computer systems; inlined code; demand-paged virtual memory machines; inlining algorithm; program size constraints; interprocedural data flow analysis; caching; paging behavior; program testing; programming; storage allocation; virtual storage
Citation:
J.W. Davidson, A.M. Hollersnm, "Subprogram Inlining: A Study of its Effects on Program Execution Time," IEEE Transactions on Software Engineering, vol. 18, no. 2, pp. 89-102, Feb. 1992, doi:10.1109/32.121752
Usage of this product signifies your acceptance of the Terms of Use.