Abstract
Compile-time elimination of subscript range checks is performed by some optimizing compilers to reduce the overhead associated with manipulating array data structures. Elimination and propagation, the two methods of subscript range check optimization, are less effective for eliminating global redundancies especially in while-loop structures with nonconstant loop guards. This paper describes a subscript range check optimization procedure that can eliminate more range checks than current methods. Two transformations called inner-loop guard elimination and conservative expression substitution are introduced to enhance propagation of range checks in nested while-loops and to define a partial order on related range checks. Global elimination is improved by considering range checks performed before control reaches a statement and after control leaves a statement. A unique feature of this method is the simplification of the available range-check analysis system for global elimination.
- 1 AHO, A. V., SETHI, R., AND ULLMAN, J. D. Compzlers: Principles, Techniques, and Tools. Addison-Wesley, Reading, Mass., 1986. Google Scholar
- 2 GUPTA, R. A fresh look at optimizing array bound checking. In Proceedings of the ACM SIGPLAN "90 Conference on Programming Language Design and Implementation (New York, June 1990), 272-282. Google Scholar
- 3 HARRISON, W. Compiler analysis of the value ranges for variables. IEEE Trans. Softw. Eng. SE-3, 3(May 1977), 243-250.Google Scholar
- 4 MARKSTEIN, V., COCKE, J., MARKSTEIN, P. Optimization of range checking. In Proceedings of ACM SIGPLAN "82 Symposium on Compiler Construction (June 1982), 114-119. Google Scholar
- 5 WEGMAN, M. N., AND ZADECK, F. K. Constant propagation with conditional branches, In Proceedings of the 12th ACM Symposium on Prznciples of Programming Languages (Jan. 1984), 152-161. Google Scholar
- 6 WELSH, J. Economic range checks in Pascal. Softw. Pract. Exper. 8 (1978), 85-97.Google Scholar
Index Terms
Optimization of array subscript range checks
Recommendations
On the automatic parallelization of subscripted subscript patterns using array property analysis
ICS '21: Proceedings of the ACM International Conference on SupercomputingParallelizing loops with subscripted subscript patterns at compile-time has long been a challenge for automatic parallelizers. In the class of irregular applications that we have analyzed, the presence of subscripted subscript patterns was one of the ...
Elimination of redundant array subscript range checks
This paper presents a compiler optimization algorithm to reduce the run time overhead of array subscript range checks in programs without compromising safety. The algorithm is based on partial redundancy elimination and it incorporates previously ...
A reexamination of “Optimization of array subscript range checks”
Jonathan Asuru proposed recently an enhanced method for optimizing array subscript range checks. The proposed method is however unsafe and may generate optimized programs whose behavior is different from the original program. Two main flaws in Asuru's ...








Comments