Alto: a platform for object code modification
Robert Muth, Saumya Debray · UA Campus Repository (The University of Arizona) · 1999
This dissertation describes Alto , a platform for object code modification for Digital Unix/Alpha executables. Object code modification, also called binary rewriting, allows us to change compiled and linked programs, thereby extending the process of code generation well past the compilation phase of a program. Object code modification is becoming increasingly important. One reason for this is the recent trend of making programs available as executables only--without the corresponding source code. We explain the difficulties encountered by object modification, especially in the area of program analysis, and show how they are dealt with in Alto. Several improvements to register liveness analysis are presented. Alto has been used to implement an optimizer which allows us to evaluate the benefits of classical compiler optimizations when applied to object code. This optimizer outperforms the vendor-supplied optimization tools significantly. Alto has also been used to instrument programs in order to generate sophisticated execution profiles, such as value profiles. We show how such profiles can be profitably exploited using a novel technique--guarded code specialization--and how this optimization can be incorporated into the optimizer. Finally, we consider the issue of code compression, i.e., using Alto to make programs smaller rather than to make them faster. A variety of transformations are presented which are able to reduce the code size of programs substantially.