Compiler techniques for code compaction

Saumya K Debray, William Evans, Robert Muth, Bjorn De Sutter

Research output: Contribution to journalArticle

145 Citations (Scopus)

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 available is limited. This makes it desirable to try to reduce the size of applications where possible. This article explores the use of compiler techniques to accomplish code compaction to yield smaller executables. The main contribution of this article is to show that careful, aggressive, interprocedural optimization, together with procedural abstraction of repeated code fragments, can yield significantly better reductions in code size than previous approaches, which have generally focused on abstraction of repeated instruction 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 can be more flexible in its treatment of what code fragments are considered equivalent. Our ideas have been implemented in the form of a binary-rewriting tool that reduces the size of executables by about 30% on the average.

Original languageEnglish (US)
Pages (from-to)378-415
Number of pages38
JournalACM Transactions on Programming Languages and Systems
Volume22
Issue number2
StatePublished - Mar 2000

Fingerprint

Compaction
Data storage equipment

Keywords

  • Code compaction
  • Code compression
  • Code size
  • Compilers
  • D.3.4 [Programming Languages]: Processors - code generation
  • E.4 [Coding and Information Theory]: Data Compaction and Compression - Program, representation
  • Experimentation
  • Optimization
  • Performance

ASJC Scopus subject areas

  • Computer Graphics and Computer-Aided Design
  • Software

Cite this

Compiler techniques for code compaction. / Debray, Saumya K; Evans, William; Muth, Robert; De Sutter, Bjorn.

In: ACM Transactions on Programming Languages and Systems, Vol. 22, No. 2, 03.2000, p. 378-415.

Research output: Contribution to journalArticle

Debray, SK, Evans, W, Muth, R & De Sutter, B 2000, 'Compiler techniques for code compaction', ACM Transactions on Programming Languages and Systems, vol. 22, no. 2, pp. 378-415.
Debray, Saumya K ; Evans, William ; Muth, Robert ; De Sutter, Bjorn. / Compiler techniques for code compaction. In: ACM Transactions on Programming Languages and Systems. 2000 ; Vol. 22, No. 2. pp. 378-415.
@article{6db427193461466abce6ca51cc985445,
title = "Compiler techniques for code compaction",
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 available is limited. This makes it desirable to try to reduce the size of applications where possible. This article explores the use of compiler techniques to accomplish code compaction to yield smaller executables. The main contribution of this article is to show that careful, aggressive, interprocedural optimization, together with procedural abstraction of repeated code fragments, can yield significantly better reductions in code size than previous approaches, which have generally focused on abstraction of repeated instruction 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 can be more flexible in its treatment of what code fragments are considered equivalent. Our ideas have been implemented in the form of a binary-rewriting tool that reduces the size of executables by about 30{\%} on the average.",
keywords = "Code compaction, Code compression, Code size, Compilers, D.3.4 [Programming Languages]: Processors - code generation, E.4 [Coding and Information Theory]: Data Compaction and Compression - Program, representation, Experimentation, Optimization, Performance",
author = "Debray, {Saumya K} and William Evans and Robert Muth and {De Sutter}, Bjorn",
year = "2000",
month = "3",
language = "English (US)",
volume = "22",
pages = "378--415",
journal = "ACM Transactions on Programming Languages and Systems",
issn = "0164-0925",
publisher = "Association for Computing Machinery (ACM)",
number = "2",

}

TY - JOUR

T1 - Compiler techniques for code compaction

AU - Debray, Saumya K

AU - Evans, William

AU - Muth, Robert

AU - De Sutter, Bjorn

PY - 2000/3

Y1 - 2000/3

N2 - In recent years there has been an increasing trend toward the incorporation of computers into a variety of devices where the amount of memory available is limited. This makes it desirable to try to reduce the size of applications where possible. This article explores the use of compiler techniques to accomplish code compaction to yield smaller executables. The main contribution of this article is to show that careful, aggressive, interprocedural optimization, together with procedural abstraction of repeated code fragments, can yield significantly better reductions in code size than previous approaches, which have generally focused on abstraction of repeated instruction 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 can be more flexible in its treatment of what code fragments are considered equivalent. Our ideas have been implemented in the form of a binary-rewriting tool that reduces the size of executables by about 30% on the average.

AB - In recent years there has been an increasing trend toward the incorporation of computers into a variety of devices where the amount of memory available is limited. This makes it desirable to try to reduce the size of applications where possible. This article explores the use of compiler techniques to accomplish code compaction to yield smaller executables. The main contribution of this article is to show that careful, aggressive, interprocedural optimization, together with procedural abstraction of repeated code fragments, can yield significantly better reductions in code size than previous approaches, which have generally focused on abstraction of repeated instruction 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 can be more flexible in its treatment of what code fragments are considered equivalent. Our ideas have been implemented in the form of a binary-rewriting tool that reduces the size of executables by about 30% on the average.

KW - Code compaction

KW - Code compression

KW - Code size

KW - Compilers

KW - D.3.4 [Programming Languages]: Processors - code generation

KW - E.4 [Coding and Information Theory]: Data Compaction and Compression - Program, representation

KW - Experimentation

KW - Optimization

KW - Performance

UR - http://www.scopus.com/inward/record.url?scp=0000162467&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=0000162467&partnerID=8YFLogxK

M3 - Article

AN - SCOPUS:0000162467

VL - 22

SP - 378

EP - 415

JO - ACM Transactions on Programming Languages and Systems

JF - ACM Transactions on Programming Languages and Systems

SN - 0164-0925

IS - 2

ER -