Optimizing array bound checks using flow analysis

Rajiv Gupta
1993 ACM Letters on Programming Languages and Systems  
Bound checks are introduced in programs for the run-time detection of array bound violations. Compile-time optimizations are employed to reduce the execution-time overhead due to bound checks. The optimizations reduce the program execution time through elimination of checks and propagation of checks out of loops. An execution of the optimized program terminates with an array bound violation if and only if the same outcome would have resulted during the execution of the program containing all
more » ... ay bound checks. However, the point at which the array bound violation occurs may not be the same. Experimental results indicate that the number of bound checks performed during the execution of a program is greatly reduced using these techniques.
doi:10.1145/176454.176507 fatcat:r4wbngdpfvhb5jzq5u4rjwzsm4