[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/73141.74840acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free access

Inline function expansion for compiling C programs

Published: 21 June 1989 Publication History

Abstract

Inline function expansion replaces a function call with the function body. With automatic inline function expansion, programs can be constructed with many small functions to handle complexity and then rely on the compilation to eliminate most of the function calls. Therefore, inline expansion serves a tool for satisfying two conflicting goals: minizing the complexity of the program development and minimizing the function call overhead of program execution. A simple inline expansion procedure is presented which uses profile information to address three critical issues: code expansion, stack expansion, and unavailable function bodies. Experiments show that a large percentage of function calls/returns (about 59%) can be eliminated with a modest code expansion cost (about 17%) for twelve UNIX* programs.

References

[1]
J. Emer and D. Clark, "A Characterization of Processor Performance in the VAX-11/780," Proceedings of the 11 th Annual Symposium on Computer Architecture, June 1984.
[2]
D.A. Patterson and C. H. Sequin, "A VLSI RISC," IEEE Computer, pp. 8 - 21, September, 1982.
[3]
D.R. Ditzel, H. R. Mclellan, and A. D. Berenbaum, "The Hardware Architecture of the CRISP Microprocessor," Proceedings of the 14th Annual International Symposium on Computer Architecture, Pittsburgh, Pennsylvania, June 2-5, 1987.
[4]
Fred C. Chow, "Minimizing Register Usage Penalty at Procedure Calls," Proceedings of the SIGPLAN '88 Conference on Programming Language Design and Implementation, June 22-24, 1988.
[5]
R. Sherbume, M. Katevenis, D. Patterson, and C. Sequin, "~ Memory in RISCs," Proceedings of the International Conference on Computer Design, IEEE, October 1983.
[6]
David W. Wall, "Register Windows vs. Register Allocation," Proceedings of the SIGPLAN '88 Conference on Programming Language Design and Implementation, June 22-24, 1988.
[7]
F.E. Allen and J. Cocke, "A Program Data Flow Analysis Procedure," Journal of the Association for Computing Machinary, vol. 19-3, pp. 137-147, March 1976.
[8]
Matthew S. Hecht and Jeffrey D. Unman, "A Simple Algorithm for Global Data Flow Analysis Problems,'' SIAM J. Comput., vol. 44, pp. 519-531, December 1975,
[9]
Jeffrey M. Barth, "A Practical interprocedural Data Flow Analysis Algorithm," Journal of the Association for Computing Machinary, vol. 21-9, pp. 724- 736, September 1978.
[10]
Z. Li and P-C Yew, "Efficient Interprocedural Analysis for Program Parallelization and Restructuring,'' Proceedings of the ACMISIGPLAN PPEALS 1988 (Parallel Programming: Experience with Applications, Languages, and Systems, pp. 85 - 99, ACM, New Haven, Connecticut, July 19-21.
[11]
R. Allen and S. Johnson, "Compiling C for Vectorization, Parallelism, and Inline Expansion," Proceedings of the ACM SiGPLAN '88 Conference on Programming Language Design and Implementation, pp. 241-249, June 22-24, 1988.
[12]
Stephen Richardson and Mahadevan Ganapathi, "Code Optimization Across Procedures," IEEE Computer, February 1989.
[13]
M. Auslander and M. Hopkins, "An Overview of the PL.8 Compiler," Proceedings of the SIGPLAN Symposium on Compiler Construction, ACM, June 1982.
[14]
C.A. Huson, An in-line Subroutine Expander for Parafrase, M.S. Thesis, University of Illinois at Urbana-Champaign, 1982.
[15]
F. Chow and J. Hennessy, "Register Allocation by Priority-bases Coloring," Proceedings of the ACM SIGPLAN Symposium on Compiler Constructions, pp. 222-232, June 17-22, 1984.
[16]
R. M. Stallman, Internals of GNU CC, Free Software Foundation, Inc., 1988.
[17]
P.P. Chang and W. W. Hwu, "Trace Selection for Compiling Large C Application Programs to Microcode," Procee&'ngs of the 21st Annual Workshop on Microprogramming and Microarchitectures, San Diego, California, November 29 - December 2.
[18]
Wen-mei W. Hwu and Pohua P. Chang, "Achieving High Instruction Cache Performance with an Optimizing Compiler," Proceedings of the 16th Annual Syrr~osium on Computer Architecture, May 1989.
[19]
Wen-mei W. Hwu, Thomas M. Conte, and Pohua P. Chang, "Comparing Software and Hardware Schemes For Reducing the Cost of Branches," Proceedings of the 16th Annual Symposium on Computer Architecture, May 1989.

Cited By

View all
  • (2024)Evaluation of Programming in C using WSM MethodREST Journal on Emerging trends in Modelling and Manufacturing10.46632/jemm/9/4/29:4(10-17)Online publication date: 25-Jun-2024
  • (2024)Hot Call-Chain Inlining for the Glasgow Haskell CompilerProceedings of the 23rd ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences10.1145/3689484.3690730(66-79)Online publication date: 21-Oct-2024
  • (2024)Cross-Inlining Binary Function Similarity DetectionProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639080(1-13)Online publication date: 20-May-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '89: Proceedings of the ACM SIGPLAN 1989 conference on Programming language design and implementation
June 1989
355 pages
ISBN:089791306X
DOI:10.1145/73141
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 24, Issue 7
    Proceedings of the SIGPLAN '89 symposium on Interpreters and interpretive techniques
    July 1989
    355 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/74818
    Issue’s Table of Contents
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 21 June 1989

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

PLDI89
Sponsor:
PLDI89: Programming Language Design & Implementation
June 19 - 23, 1989
Oregon, Portland, USA

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)286
  • Downloads (Last 6 weeks)25
Reflects downloads up to 03 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Evaluation of Programming in C using WSM MethodREST Journal on Emerging trends in Modelling and Manufacturing10.46632/jemm/9/4/29:4(10-17)Online publication date: 25-Jun-2024
  • (2024)Hot Call-Chain Inlining for the Glasgow Haskell CompilerProceedings of the 23rd ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences10.1145/3689484.3690730(66-79)Online publication date: 21-Oct-2024
  • (2024)Cross-Inlining Binary Function Similarity DetectionProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3639080(1-13)Online publication date: 20-May-2024
  • (2022)RollBin: reducing code-size via loop rerolling at binary levelProceedings of the 23rd ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems10.1145/3519941.3535072(99-110)Online publication date: 14-Jun-2022
  • (2021)PIBE: practical kernel control-flow hardening with profile-guided indirect branch eliminationProceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3445814.3446740(743-757)Online publication date: 19-Apr-2021
  • (2019)BiN: A Two-Level Learning-Based Bug Search for Cross-Architecture BinaryIEEE Access10.1109/ACCESS.2019.29531737(169548-169564)Online publication date: 2019
  • (2019)dOCAL: high-level distributed programming with OpenCL and CUDAThe Journal of Supercomputing10.1007/s11227-019-02829-2Online publication date: 30-Mar-2019
  • (2018)Partial Inlining Using Local Graph RewritingProceedings of the 11th European Lisp Symposium on European Lisp Symposium10.5555/3323215.3323230(102-109)Online publication date: 18-Apr-2018
  • (2018)Data Stream Evolution Diagnosis Using Recursive Wavelet Density EstimatorsACM Transactions on Knowledge Discovery from Data10.1145/310636912:1(1-28)Online publication date: 23-Jan-2018
  • (2018)Learning to Infer Competitive Relationships in Heterogeneous NetworksACM Transactions on Knowledge Discovery from Data10.1145/305112712:1(1-23)Online publication date: 13-Feb-2018
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media