Rastislav Bodik, University of Wisconsin
Rajiv Gupta, University of Arizona
Vivek Sarkar, IBM T.J. Watson Research Center
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 data flow graph and performing a simple traversal of the graph. Despite its simplicity, ABCD is surprisingly powerful. On our benchmarks, on ABCD removes on average 45% of dynamic bound check instructions, sometimes achieving close to 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.
full paper (.ps)