Abstract
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 array 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.
- Ago, A. V., SETHI, R., AND ULLMAN, J.D. 1986. Compilers: Principles, Techniques, and Tools. Addison-Wesley, Reading, Mass. Google Scholar
- BANERJEE, U. 1988. Dependence Analysis for Supercomputing. Kluwer Academic Publishers, Boston, Mass. Google Scholar
- CALLAHAN, D., COOPER, K. D., KENNEDY, K., AND TORCZON, L. 1986. Interprocedural constant propagation. In Proceedings 14th ACM Symposium on Principles of Programming Languages. (St. Petersburg Beach, Fla., Jan. 13-15). ACM, New York, 152-161. Google Scholar
- CHOW, F. 1983. A portable machine-independent global optimizer--Design and measurements. Tech. Rep. 83-254, Ph.D. thesis, Computer Systems Lab, Stanford Univ., Calif. Google Scholar
- GUPTA, R. 1990. A fresh look at optimizing array bound checking. In Procee&ngs ACM SIGPLAN 90 Conference on Programming Language Design and Implementation (White Plains, N.Y., June 20-22). ACM, New York, 272-282. Google Scholar
- GUPTA, R., A~D SPEZIALETTI, M. 1991. Loop monotonic computations: An approach for the efficient run-time detection of races. In Proceedings of the SIGSOFT Symposium on Testing, Analysis, and Verification. (Victoria, B.C., Oct. 8-10). ACM, New York, 98-111. Google Scholar
- HARRISON, W. 1977. Compiler analysis of the value ranges for variables. IEEE Trans. Softw. Eng. 3, 3 (May), 243-250.Google Scholar
- MARKSTEIN, V., COCKE, J., AND MARKSTEIN, P. 1982. Optimization of range checking. In Proceedings of SIGPLAN 82 Symposium on Compiler Construction. (Boston, Mass., June 23-25). ACM, New York, 114-119. Google Scholar
- SUZUKI, N., AND ISHIHATA, K. 1977. Implementation of array bound checker. In Proceedings 4th ACM Symposium on Principles of Programming Languages. ACM, New York, 132-143. Google Scholar
- WEGMAN, M. N., AND ZADECK, F.K. 1984. Constant propagation with conditional branches. In Proceedings 12th ACM Symposium on Princtples of Programming Languages. (Salt Lake City, Ut., Jan. 15-18). ACM, New York, 152-161. Google Scholar
Index Terms
Optimizing array bound checks using flow analysis
Recommendations
A fresh look at optimizing array bound checking
This paper describes techniques for optimizing range checks performed to detect array bound violations. In addition to the elimination of range checks, the optimizations discussed in this paper also reduce the overhead due to range checks that cannot be ...
Efficient and effective array bound checking
Array bound checking refers to determining whether all array references in a program are within their declared ranges. This checking is critical for software verification and validation because subscripting arrays beyond their declared sizes may produce ...
A fresh look at optimizing array bound checking
PLDI '90: Proceedings of the ACM SIGPLAN 1990 conference on Programming language design and implementationThis paper describes techniques for optimizing range checks performed to detect array bound violations. In addition to the elimination of range checks, the optimizations discussed in this paper also reduce the overhead due to range checks that cannot be ...








Comments