Understanding the Behavior of Compiler Optimizations

Han Lee
J. Elliot B. Moss
Software: Practice and Experience, 36(2006), pp. 835-844

Abstract

Compiler writers usually follow some known rules of thumb on the effectiveness of optimizations when implementing compilers. While many of these rules may be correct, it is a far better methodology to base implementation decisions on a scientific evaluation of optimizations. To this end, we present an exploration of the costs and benefits of optimizations implemented in Jikes RVM, a research virtual machine that includes an aggressive optimizing compiler. We measure and report the performance impact due to optimizations, both when the optimizations are used by themselves and when they are used with other optimizations. To understand why optimizations do or do not improve performance, we wrote kernel programs to test and explore the behavior of each optimization. To increase the generality of our results, we report measurements on two architectures (IA32 and PowerPC). Based on our findings, we present a set of recommendations for compiler writers.

Research Areas