Sifting out the mud: Low level C++ code reuse

被引:26
作者
De Sutter, B [1 ]
De Bus, B [1 ]
De Bosschere, K [1 ]
机构
[1] Univ Ghent, Elect & Informat Syst Dept, B-9000 Ghent, Belgium
关键词
experimentation; performance; code compaction; code size reduction;
D O I
10.1145/583854.582445
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
More and more computers are being incorporated in devices where the available amount of memory is limited. This contrasts with the increasing need for additional functionality and the need for rapid application development. While object-oriented programming languages, providing mechanisms such as inheritance and templates, allow fast development of complex applications, they have a detrimental effect on program size. This paper introduces new techniques to reuse the code of whole procedures at the binary level and a supporting technique for data reuse. These techniques benefit specifically from program properties originating from the use of templates and inheritance. Together with our previous work on code abstraction at lower levels of granularity, they achieve additional code size reductions of up to 38% on already highly optimized and compacted binaries, without sacrificing execution speed. We have incorporated these techniques in SQUEEZE++, a prototype link-time binary rewriter for the Alpha architecture, and extensively evaluate them on a suite of 8 real-life C++ applications. The total code size reductions achieved post link-time (i.e. without requiring any change to the compiler) range from 27 to 70%, averaging at around 43%.
引用
收藏
页码:275 / 291
页数:17
相关论文
共 39 条
[1]  
AGESEN O, 1994, P 9 ANN C OBJ OR PRO, P355
[2]  
Baker BS, 1998, PROCEEDINGS OF THE USENIX 1998 ANNUAL TECHNICAL CONFERENCE, P179
[3]  
BRAY G, 1984, P 84 S COMPILER CONS, P276
[4]   Java']Java bytecode compression for low-end embedded systems [J].
Clausen, LR ;
Schultz, UP ;
Consel, C ;
Muller, G .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2000, 22 (03) :471-489
[5]  
COHN R, 1997, USENIX WIND NT WORKS
[6]  
COOPER K, 1999, P ACM SIGPLAN C PROG, P139
[7]   Vortex: An optimizing compiler for object-oriented languages [J].
Dean, J ;
DeFouw, G ;
Grove, D ;
Litvinov, V ;
Chambers, C .
ACM SIGPLAN NOTICES, 1996, 31 (10) :83-100
[8]  
DEBRAY S, 2002, P ACM SIGPLAN 2002 C, P95
[9]   Compiler techniques for code compaction [J].
Debray, SK ;
Evans, W ;
Muth, R ;
De Sutter, B .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2000, 22 (02) :378-415
[10]  
DESUTTER B, 2001, P ACM SIGPLAN WORKSH, P29