SOS: incremental user-defined optimization system
Philippe Poisson · 1990
Many years have been devoted to software automation under the label Computer Aided Software Engineering. One part of this automation involves the coding as well as the documentation. We will focus on the impact of high-level programming techniques, with emphasis on readability and maintainability of programs, their possible optimizations, and the problems created by manually optimizing an existing code, and usually making it more difficult to understand. We will demonstrate that it is feasible to automate the optimization of a program using a standard compiler, without making this program obscure and without having to rewrite the documentation for it, by adding a new layer of optimization at the source level. Thus the readability of programs does not have to be sacrificed for their efficiency. We will also prove the correctness of these optimizations. Traditionally, optimizing compilers hide their optimization procedures, in the sense that the user has very little control, if any, over the optimization phase. We want to introduce the idea of making the optimizer of a compiler user-accessible and user-definable, which would bring these procedures to the user level, so that they can be controlled, modified and even extended by the user. This would allow the programmer to use them to optimize the compilation of his own functions: each user-defined function would be able to have its own optimizer, which would be associated with it at compile time. The compiler now, instead of being a static entity, becomes a dynamic set of objects. We will analyze how this new level interacts with the compiler built-in optimizations, and show that we achieved improvements ranging from 4% to 41% when applying our system to standard C programs.