Technical Report 2000-022

Optimizing Code Size through Procedural Abstraction

Johan Runeson, Sven-Olof Nyström, and Jan Sjödin

September 2000

Abstract:
Memory size is an important economic factor in the development of embedded systems. It is therefore desirable to find compiler optimization techniques that reduce the size of the generated code. One such code compression technique is procedural abstraction, where repeated occurrences of equivalent code fragments are factored out into new subroutines. Previously, procedural abstraction has been applied at the machine code level in optimizing linkers or binary rewriting tools. We investigate the prospects of applying procedural abstraction at the intermediate code level of a whole-program optimizing C compiler. Placing the optimization before register allocation makes it target independent, and will allow us to take full advantage of powerful code selection, register allocation and code scheduling techniques.

Note: An extended abstract appears in the Proceedings of the ACM SIGPLAN 2000 Workshop on Languages, Compilers, and Tools for Embedded Systems (LCTES'2000)

Available as compressed Postscript (73 kB, no cover)

Download BibTeX entry.