Compiler techniques for code compaction

Citation
Sk. Debray et al., Compiler techniques for code compaction, ACM T PROGR, 22(2), 2000, pp. 378-415
Citations number
20
Categorie Soggetti
Computer Science & Engineering
Journal title
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS
ISSN journal
01640925 → ACNP
Volume
22
Issue
2
Year of publication
2000
Pages
378 - 415
Database
ISI
SICI code
0164-0925(200003)22:2<378:CTFCC>2.0.ZU;2-W
Abstract
In recent years there has been an increasing trend toward the incorporation of computers into a variety of devices where the amount of memory availabl e is limited. This makes it desirable to try to reduce the size of applicat ions where possible. This article explores the use of compiler techniques t o accomplish code compaction to yield smaller executables. The main contrib ution of this article is to show that careful, aggressive, interprocedural optimization, together with procedural abstraction of repeated code fragmen ts, can yield significantly better reductions in code size than previous ap proaches, which have generally focused on abstraction of repeated instructi on sequences. We also show how "equivalent" code fragments can be detected and factored out using conventional compiler techniques, and without having to resort to purely linear treatments of code sequences as in suffix-tree- based approaches, thereby setting up a framework for code compaction that c an be more flexible in its treatment of what code fragments are considered equivalent. Our ideas have been implemented in the form of a binary-rewriti ng tool that reduces the size of executables by about 30% on the average.