Inline function expansion for compiling C programs

Inline function expansion for compiling C programs
复制标题

DOI:
10.1145/73141.74840
复制
发表时间:
1989-06
期刊:
--
影响因子:
--
通讯作者:
W. Hwu;P. Chang
W. Hwu;P. Chang
中科院分区:
其他
文献类型:
--
作者:
W. Hwu;P. Chang

文献摘要

被引文献

相似文献

内联函数扩展将函数调用替换为函数体。通过自动内联函数扩展,可以使用许多小函数来构建程序来处理复杂性,然后依靠编译来消除大多数函数调用。因此,内联扩展提供了一种工具来满足两个相互冲突的目标:最小化程序开发的复杂性和最小化程序执行的函数调用开销。给出了一个简单的内联扩展过程,它使用配置文件信息来解决三个关键问题:代码扩展、堆栈扩展和不可用的函数体。实验表明,对于12个Unix*程序,可以用适度的代码扩展成本(约17%)消除很大比例的函数调用/返回(约59%)。
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.