Function Inlining with Code Size Limitation in Embedded Systems
Xinrong Zhou, Johan Lilius, and Lu Yan
Turku Centre for Computer Science, Abo Akademi University, Finland
Abstract: Function inlining is a widely known technique that has been adopted in compiler optimization research domain. Inlining functions can eliminate the overhead which is resulted from function calls, but with inlining, the code size also grows unpredictably; this is not suitable for embedded processors whose memory size is relatively small. In this paper, we introduce a novel function inlining approach using a heuristic rebate_ratio; functions to be inlined are selected according to their rebate_ratios in a descending way. This kind of code optimization operation works at the source code level. Compared with other algorithms, ours are easier to implement. Our target is to get an optimal result of function inlining which attempts to achieve the maximum performance improvement while keeping the code size within a defined limit.
Keywords: Function inlining, embedded processors, graph, complexity.
Received April 2, 2004; accepted July 1, 2004