Inline Function Expansion for Compiling C Programs

P. P. Chang, W. W. Hwu

Research output: Contribution to journalArticlepeer-review

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 1989 can be eliminated with a modest code expansion cost (about 17%) for twelve UNIX* programs.

Original languageEnglish (US)
Pages (from-to)246-257
Number of pages12
JournalACM SIGPLAN Notices
Volume24
Issue number7
DOIs
StatePublished - Jun 21 1989

ASJC Scopus subject areas

  • Software
  • Computer Graphics and Computer-Aided Design

Fingerprint

Dive into the research topics of 'Inline Function Expansion for Compiling C Programs'. Together they form a unique fingerprint.

Cite this