Code Factoring in GCC
暂无分享,去创建一个
Though compilers usually focus on optimizing for performance, the size of the generated code has only received attention recently. On general desktop systems the code size is not the biggest concern, but on devices with a limited storage capacity compilers should strive for as small a code as possible. GCC already contains some very useful algorithms for optimizing code size, but code factoring – a very powerful approach to reducing code size – has not been implemented yet in GCC. In this paper we will provide an overview of the possibilities of using code factoring in GCC. Two code factoring algorithms have been implemented so far. These algorithms, using CSiBE as a benchmark, produced a maximum of 27% in code size reduction and an average of 3%.
[1] Koen De Bosschere,et al. Combining Global Code and Data Compaction , 2001, OM '01.
[2] Bjorn De Sutter,et al. Compiler techniques for code compaction , 2000, TOPL.
[3] Rajiv Gupta,et al. Code Compaction of Matching Single-Entry Multiple-Exit Regions , 2003, SAS.
[4] Keith D. Cooper,et al. Enhanced code compression for embedded RISC processors , 1999, PLDI '99.