Exploiting function similarity for code size reduction

作者: Tobias J.K. Edler von Koch , Björn Franke , Pranav Bhandarkar , Anshuman Dasgupta

DOI: 10.1145/2597809.2597811

关键词: Code generationDead code eliminationReduction (complexity)Overhead (computing)Parallel computingComputer scienceDuplicate codeCompilerQualcomm HexagonSoftwarex86Control flow

摘要: For cost-sensitive or memory constrained embedded systems, code size is at least as important performance. Consequently, compact generation has become a major focus of attention within the compiler community. In this paper we develop pragmatic, yet effective reduction technique, which exploits structural similarity functions. It avoids duplication through merging similar functions and targeted insertion control flow to resolve small differences. We have implemented our purely software based platform-independent technique in LLVM frame work evaluated it against SPEC CPU2006 benchmarks three target platforms: Intel x86, ARM Qualcomm Krait(TM), Hexagon(TM) DSP. demonstrate that for can be reduced by more than 550KB on x86. This corresponds an overall 4%, up 11.5% individual programs. Overhead introduced additional compensated better I-cache performance compacted also show identifying suitable candidates subsequent efficiently.

参考文章(28)
L. Van Put, D. Chanet, B. De Bus, B. De Sutter, K. De Bosschere, DIABLO: a reliable, retargetable and extensible link-time rewriting framework international symposium on signal processing and information technology. pp. 7- 12 ,(2005) , 10.1109/ISSPIT.2005.1577061
Rajiv Gupta, Bengu Li, Wen-Ke Chen, Code compaction of matching single-entry multiple-exit regions static analysis symposium. pp. 401- 417 ,(2003) , 10.5555/1760267.1760299
Raghavan Komondoor, Susan Horwitz, Using Slicing to Identify Duplication in Source Code static analysis symposium. pp. 40- 56 ,(2001) , 10.1007/3-540-47764-0_3
Halvar Flake, Structural Comparison of Executable Objects DIMVA. pp. 161- 173 ,(2004) , 10.17877/DE290R-2007
A. Halambi, A. Shrivastava, A. Nicolau, N. Dutt, P. Biswas, An Efficient Compiler Technique for Code Size Reduction Using Reduced Bit-Width ISAs design, automation, and test in europe. pp. 402- 408 ,(2002) , 10.5555/882452.874375
Saumya K. Debray, William Evans, Robert Muth, Bjorn De Sutter, Compiler techniques for code compaction ACM Transactions on Programming Languages and Systems. ,vol. 22, pp. 378- 415 ,(2000) , 10.1145/349214.349233
Keith D. Cooper, Nathaniel McIntosh, Enhanced code compression for embedded RISC processors Proceedings of the ACM SIGPLAN 1999 conference on Programming language design and implementation - PLDI '99. ,vol. 34, pp. 139- 149 ,(1999) , 10.1145/301618.301655
Silvio Cesare, Yang Xiang, Malware Variant Detection Using Similarity Search over Sets of Control Flow Graphs trust security and privacy in computing and communications. pp. 181- 189 ,(2011) , 10.1109/TRUSTCOM.2011.26
Martin Thuresson, Per Stenstrom, Evaluation of extended dictionary-based static code compression schemes computing frontiers. pp. 77- 86 ,(2005) , 10.1145/1062261.1062278