Strength Reduction for Loop-Invariant Types

Nguyen, P.H. and Xue, J.

    Types are fundamental for enforcing levels of abstraction in modern high-level programming languages and their lower-level representations. However, some type-related features such as dynamic method calls and dynamic type casts can contribute substantially to the performance of a program. Loop-invariant type is a concept relating to an object whose dynamic type never changes inside a loop. In this case, operations on the type of the object may be redundant in the loop. As these operations often cause exceptions, existing redundancy elimination techniques usually fail to optimise them. This paper proposes a new approach to reducing the cost of two important operations on loop-invariant types: method tests and dynamic type checking. We demonstrate its usefulness and bene_t in IBM's Jikes RVM, a dynamic compilation system for Java.
Cite as: Nguyen, P.H. and Xue, J. (2004). Strength Reduction for Loop-Invariant Types. In Proc. Twenty-Seventh Australasian Computer Science Conference (ACSC2004), Dunedin, New Zealand. CRPIT, 26. Estivill-Castro, V., Ed. ACS. 213-222.
pdf (from crpit.com) pdf (local if available) BibTeX EndNote GS