Automatic Generation of Code Optimizers from Formal Specifications

Paleri, VK.  2002.  Automatic Generation of Code Optimizers from Formal Specifications. The Compiler Design Handbook. :61-97.


Code optimization or code transformation is a complex function of a compiler involving analyses and modifications with the entire program as its scope. In spite of its complexity, hardly any tools exist to support this function of the compiler. This article presents the development of a code transformation system, specifically for scalar transformations, which can be used either as a tool to assist the generation of code transformers or as an environment for experimentation with code transformations. The system is unique of its kind, providing a complete environment in which one can specify a transformation using dependence relations - in the specification language we have designed, generate code for a transformer from its specification, and experiment with the generated transformers on real-world programs.