Exploitable Run-Time Information

Several run-time properties of programs could be exploited by a dynamic compiler to perform performance-improving program transformations, for example:

Behavioral information, such as execution frequencies of instructions or procedures, could be used to restructure program code for better pipeline or cache performance. Tranformations based on behavioral information result in code that is semantically equivalent to the original code, but which runs faster given a particular type of behavior. However, because the performance benefits of the more efficient, dynamically compiled code are offset by the run-time cost of the dynamic compile, it is unclear whether optimizing on the basis of behavioral information would provide sufficient performance improvements to make it worthwhile for most programs. Furthermore, it is unclear whether program behavior is typically consistent enough to permit profile data to be used to perform the optimizations statically while still achieving most of the benefit.

State information, such as variables' types or values, could be used to generate code specialized to that run-time state. The resulting code can run much faster than the original, general code, but can only be correctly applied when the program's state matches the state for which the code was specialized. Because the values of particular variables are typically different for different inputs, this type of optimization cannot be performed statically without code explosion.


Last updated May 7, 1997.
Brian Grant (grant@cs.washington.edu)