The compiler writer’s job is becoming more and more complicated. Some of the most widely used languages do not provide compiler writers with elementary tools for ensuring type safety, especially with regard to pointers and arrays. On the other hand, in their search for ever-improving performance, hardware designers ignore the problems they place on the writers’ shoulders when they tend toward the theoretical peak performance of the new architectures.
When a language such as Java is designed to guarantee type safety, it does so in a way that does not make the compiler writer’s job easier, because of the necessary use of bytecode and the complicated rules for handling exceptions.
This paper addresses this dilemma by describing techniques for enhancing common optimizations in the case of a type-safe language. It introduces the clever idea of fault safety that guarantees that a dangerous operation will not fault at a given program point. This makes it possible to eliminate more checks and to use more speculative code motion. Murphy et al. develop the method, using an intermediate language of a lower level than bytecode.
The experimental results presented for four-bar diagrams seem very encouraging--until one notices that the bars are incomplete! They describe normalized instruction time, with 1.00 being the value before optimization, and the diagrams show only the top of the bars, between 0.80 and 1.00 in the best case. Thus, the improvements are only a maximum of ten percent; this is really disappointing after so much work.
The paper is written in a somewhat heavy style, with typographical errors, but it is still worth reading.