Eliminating Exception Constraints of Java Programs for IA-64
Kazuaki Ishizaki, Tatsushi Inagaki, Hideaki Komatsu, Toshio Nakatani
IBM Research, Tokyo Research Laboratory
ishizaki@trl.ibm.co.jp
Abstract
Java exception checks are designed to ensure that any
faulting instruction causing a hardware exception does not
terminate the program abnormally. These checks, however,
impose some constraints upon the execution order between an
instruction potentially raising a Java exception and a faulting
instruction causing a hardware exception. This reduces the
effectiveness of instruction reordering optimization. We pro-
pose a new framework to effectively perform speculation for
the Java language using a direct acyclic graph representation
based on the SSA form. Using this framework, we apply a
well-known speculation technique to a faulting load instruc-
tion to eliminate such constraints. We use edges to represent
exception constraints. This allows us to accurately estimate
the potential reduction of the critical path length for applying
speculation. We also propose an approach to avoid extra
copy instructions and to generate efficient code with minimum
register pressure. We have implemented the technique in the
IBM Java Just-In-Time compiler, and observed performance
improvements up to 25% for micro-benchmark programs, up
to 10% for Java Grande Benchmark Suite, and up to 12% for
SPECjvm98 on an Itanium processor.
1
Introduction
The type safety feature of Java language calls for its byte-
code to make quite a few runtime exception checks in order to
eliminate error-prone situations. These runtime checks ensure
that a Java program cannot execute unsafe operations that
may cause the program to be terminated abnormally. Excep-
tions in Java programs can be categorized into two types:
hardware exceptions and Java exceptions. Hardware excep-
tions are those which the hardware may throw as the result of
program execution such as segmentation faults and invalid
operations. Java exceptions a