Optimization of array subscript range checks
- 1 June 1992
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Letters on Programming Languages and Systems
- Vol. 1 (2) , 109-118
- https://doi.org/10.1145/151333.151392
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.Keywords
This publication has 2 references indexed in Scilit:
- Economic range checks in pascalSoftware: Practice and Experience, 1978
- Compiler Analysis of the Value Ranges for VariablesIEEE Transactions on Software Engineering, 1977