ABCD
Authors:
Open Access
- 1 May 2000
- journal article
- Published by Association for Computing Machinery (ACM) in ACM SIGPLAN Notices
- Vol. 35 (5) , 321-333
Abstract
To guarantee typesafe execution, Java and other strongly typed languages require bounds checking of array accesses. Because array-bounds checks may raise exceptions, they block code motion of instructions with side effects, thus preventing many useful code optimizations, such as partial redundancy elimination or instruction scheduling of memory operations. Furthermore, because it is not expressible at bytecode level, the elimination of bounds checks can only be performed at run time , after the bytecode program is loaded. Using existing powerful bounds-check optimizers at run time is not feasible, however, because they are too heavyweight for the dynamic compilation setting. ABCD is a light-weight algorithm for elimination of Array Bounds Checks on Demand. Its design emphasizes simplicity and efficiency. In essence, ABCD works by adding a few edges to the SSA value graph and performing a simple traversal of the graph. Despite its simplicity, ABCD is surprisingly powerful. On our benchmarks, ABCD removes on average 45% of dynamic bound check instructions, sometimes achieving near-ideal optimization. The efficiency of ABCD stems from two factors. First, ABCD works on a sparse representation. As a result, it requires on average fewer than 10 simple analysis steps per bounds check. Second, ABCD is demand-driven . It can be applied to a set of frequently executed (hot) bounds checks, which makes it suitable for the dynamic-compilation setting, in which compile-time cost is constrained but hot statements are known.Keywords
This publication has 35 references indexed in Scilit:
- The Jalapeño dynamic optimizing compiler for Java1999
- Load-reuse analysis1999
- Complete removal of redundant expressions1998
- A practical framework for demand-driven interprocedural data flow analysisACM Transactions on Programming Languages and Systems, 1997
- A new algorithm for partial redundancy elimination based on SSA form1997
- Interprocedural conditional branch elimination1997
- Directed hypergraphs and applicationsDiscrete Applied Mathematics, 1993
- Optimization of array subscript range checksACM Letters on Programming Languages and Systems, 1992
- Efficiently computing static single assignment form and the control dependence graphACM Transactions on Programming Languages and Systems, 1991
- Detecting equality of variables in programs1988