摘要:Java exception checks are designed to ensure that any faulting instruction causing a hard ware exception does not terminate the program abnormally. These checks, however, impose some con-straints 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 re-ordering optimizations for Java programs. Although so me effective techniques have been pro-posed to eliminate exception checks, many exception checks still remain. We propose a new framework to perform speculation effectively for Java programs using a direct acyclic graph rep-resentation (DAG) based on the SSA form. Using this framework, we apply a well-known specu-lation technique to a faulting load instruction to eliminate such constraints. We use edges to repre-sent exception constraints. This allows us to estimate the potential reduction of the critical path length accurately for applying speculation. The new framework also allows us to avoid extra copy instructions and to generate efficient code with minimu m register pressure. We have implemented it in the IBM Java Just-In-Time compiler, and observed performance improvements of 30% for one of the micro-benchmark programs, up to 13% (with an average of 1.7%) for the Java Grande Benchmark Suite, and up to 12% (with an average of 1.2%) for SPECjvm98 on an Itanium proces-sor. Our speculation technique was particularly effective for those programs that access multi-dimensional arrays