ACM SIGPLAN Notices · 2014 · 11 citations · 19 references
EngineeringComputer EngineeringComputer ScienceCompilersComputer ArchitectureEmbedded SystemsCode GenerationHardware AccelerationCache-aware Code GenerationCode Optimization For Embedded SystemsCode Size OptimizationCompiler DesignDuplication MechanismsFunction-level SimilarityMergingMicroarchitectural Optimization
For cost-sensitive or memory constrained embedded systems, code size is at least as important as performance. Consequently, compact code generation has become a major focus of attention within the compiler community. In this paper we develop a pragmatic, yet effective code size reduction technique, which exploits structural similarity of functions. It avoids code duplication through merging of similar functions and targeted insertion of control flow to resolve small differences. We have implemented our purely software based and platform-independent technique in the LLVM compiler frame work and evaluated it against the SPEC CPU2006 benchmarks and three target platforms: Intel x86, ARM based Qualcomm Krait(TM), and Qualcomm Hexagon(TM) DSP. We demonstrate that code size for SPEC CPU2006 can be reduced by more than 550KB on x86. This corresponds to an overall code size reduction of 4%, and up to 11.5% for individual programs. Overhead introduced by additional control flow is compensated for by better I-cache performance of the compacted programs. We also show that identifying suitable candidates and subsequent merging of functions can be implemented efficiently.
19
Compiler techniques for code compaction
Saumya Debray, William Evans, Robert Muth et al. · ACM Transactions on Programming Languages and Systems · 2000 · 275 citations · Full text
Proceedings of the GCC Developers' Summit
Grigori Fursin, Cupertino Miranda, Olivier Temam et al. · 2008 · 123 citations
DIABLO: a reliable, retargetable and extensible link-time rewriting framework
Ludo Van Put, Dominique Chanet, Bruno De Bus et al. · 2005 · 100 citations