Graph-Based Procedural Abstraction: Compacting Code for ARM-Architectures
Goal of this book was it to create program code for embedded systems as compact as possible, because memory is one of the limiting factors on theses systems.As there are often various procedures with the same or very similar code fragments, compilers do not generate optimal code in terms of code size. Most of these fragments only differ in the ordering of the instructions or the used registers. These fragments can be abstracted into own procedures which afterwards get called. Because modern compilers only optimize a procedure or a module at the time, they lack the information to do these optimizations. Some optimizations evolve only after the final register allocation and the linking of all modules and libraries. Because of this we apply procedural abstraction in this book to statically linked binaries. An search for common code not only in code sequences but among data flow graphs. This way we where able to save twice as much instructions on average.