Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/207110.207160acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free access

Elimination of redundant array subscript range checks

Published: 01 June 1995 Publication History

Abstract

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 developed algorithms for range check optimization. We implemented the algorithm in our research compiler, Nascent, and conducted experiments on a suite of 10 benchmark programs to obtain four results: (1) the execution overhead of naive range checking is high enough to merit optimization, (2) there are substantial differences between various optimizations, (3) loop-based optimizations that hoist checks out of loops are effective in eliminating about 98% of the range checks, and (4) more sophisticated analysis and optimization algorithms produce very marginal benefits.

References

[1]
A. V. Aho, R. Sethi, and J. D. Ullman. Compilers, Principles, Techniques, and Tools. Addison-Wesley, 1986.
[2]
J. M. Asuru. Optimization of array subscript range checks. A CM Letters on Programming Languages and Systems, vol. 1, no. 2, 109-118, June 1992.
[3]
P. Briggs and K. D. Cooper. Effective partial redundancy elimination. Proceedings of the A CM SIGPLAN '94 Conference on Programming Language Design and Implementation, i59-170, June, 1994.
[4]
P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. Conference Record of the jtn A CM Symposzum on Principles of Programming Languages, 238-252, January, 1977.
[5]
P. Cousot and N. Halbwachs. Automatic discovery of linear restraints among variables of a program. Conference Record of the 5~n A CM Symposium on Principles of Programming Languages, 84-96, January, 1978.
[6]
R. Cytron, J. Ferrante, B. K. Rosen, M. N. Wegman and F. K. Zadeck. Efficiently computing static single assignment form and the control dependence graph. A CM Transactions on Programming Languages and Systems, vol. 13, no. 4, pp. 451-490, October, 1991.
[7]
M. P. GerIek, E. Stoltz, and M. Wolfe. Beyond induction variables: Detecting and classifying sequences using a demand-driven SSA form. A CM Transactions on Programming Languages and Systems, to appear.
[8]
S. M. German. Automating proofs of the absence of common runtime errors. Conference Record of the 5tn A CM Symposium on Principles of Programming Languages, 105-118, January, 1978.
[9]
R. Gupta. A flesh look at optimizing array bound checking. Proceedings of the A CM SIGPLAN '90 Conference on Programm~ng Language Design and Implementation, 272-282, June, 1990.
[10]
R. Gupta. Optimizing array bound checks using flow analysis. A CM Letters on Programming Languages and Systems, vol. 2, nos. 1-4, 135-150, March-December, 1993.
[11]
W. H. Harrison. Compiler analysis for the value ranges for variables. IEEE Transactzons on Software Engineemng, SE- 3, 3, 243-250, May, 1977.
[12]
J. Knoop, O. Rfithing, and B. Steffen. Lazy code motion. Proceedings of the A CM SIGPLAN '92 Conference on Programmzng Language Design and Implementation, 224-234, June, 1992.
[13]
V. Markstein, J. Cocke, and P. Markstein. Optimization of range checking. Proceedings of the SIGPLAN '82 Symposium on Compiler Constructwn, 114-119, June 1982.
[14]
E. Morel. Data flow analysis and global optimization, in Method6 and tools for compiler construction, B. Lorho (ed.), Cambridge University Press, New York, 289-315, 1984.
[15]
E. Morel and C. Renvoise. Global optimization by suppression of partial redundancies. Communications of the A CM, vol. 2, no. 2, 96-103, February, 1979.
[16]
B. Schwarz, W. Kirchgassner, and R. Landwehr. An optimizer for Ada - design, experiences and results. Proceedings SIGPLA1V '88 Conference on Programr~zng Language Design and Implementation, 175-185, June, 1988.
[17]
N. Suzuki and K. Ishihata. Implementation of an array bound checker. Conference Record of the 4tn A CM Symposium on Principles of Programming Languages, 132-143, J anu ary, 1977.
[18]
M. Wolfe. Beyond induction variables. Proceedings o{ the A CM SIGPLAN '92 Conference on Programming Language Design and implementation, 162-174, June, 1992.

Cited By

View all
  • (2019)Handling index-out-of-bounds in safety-critical embedded C code using model-based developmentSoftware and Systems Modeling (SoSyM)10.1007/s10270-018-0697-y18:3(1795-1807)Online publication date: 1-Jun-2019
  • (2016)Handling index-out-of-bounds in safety-critical embedded C code using model-based developmentProceedings of the ACM/IEEE 19th International Conference on Model Driven Engineering Languages and Systems10.1145/2976767.2976803(143-149)Online publication date: 2-Oct-2016
  • (2011)Eliminating partially-redundant array-bounds check in the Android Dalvik JIT compilerProceedings of the 9th International Conference on Principles and Practice of Programming in Java10.1145/2093157.2093175(121-128)Online publication date: 24-Aug-2011
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '95: Proceedings of the ACM SIGPLAN 1995 conference on Programming language design and implementation
June 1995
335 pages
ISBN:0897916972
DOI:10.1145/207110
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 June 1995

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

PLDI95
Sponsor:

Acceptance Rates

PLDI '95 Paper Acceptance Rate 28 of 105 submissions, 27%;
Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)103
  • Downloads (Last 6 weeks)20
Reflects downloads up to 16 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2019)Handling index-out-of-bounds in safety-critical embedded C code using model-based developmentSoftware and Systems Modeling (SoSyM)10.1007/s10270-018-0697-y18:3(1795-1807)Online publication date: 1-Jun-2019
  • (2016)Handling index-out-of-bounds in safety-critical embedded C code using model-based developmentProceedings of the ACM/IEEE 19th International Conference on Model Driven Engineering Languages and Systems10.1145/2976767.2976803(143-149)Online publication date: 2-Oct-2016
  • (2011)Eliminating partially-redundant array-bounds check in the Android Dalvik JIT compilerProceedings of the 9th International Conference on Principles and Practice of Programming in Java10.1145/2093157.2093175(121-128)Online publication date: 24-Aug-2011
  • (2011)Exploiting static application knowledge in a Java compiler for embedded systemsProceedings of the 9th International Workshop on Java Technologies for Real-Time and Embedded Systems10.1145/2043910.2043927(96-105)Online publication date: 26-Sep-2011
  • (2010)Lazy binary-splittingACM SIGPLAN Notices10.1145/1837853.169347945:5(179-190)Online publication date: 9-Jan-2010
  • (2010)Scalable communication protocols for dynamic sparse data exchangeACM SIGPLAN Notices10.1145/1837853.169347645:5(159-168)Online publication date: 9-Jan-2010
  • (2010)Model-driven autotuning of sparse matrix-vector multiply on GPUsACM SIGPLAN Notices10.1145/1837853.169347145:5(115-126)Online publication date: 9-Jan-2010
  • (2010)An adaptive performance modeling tool for GPU architecturesACM SIGPLAN Notices10.1145/1837853.169347045:5(105-114)Online publication date: 9-Jan-2010
  • (2010)Recursive symbolic bound analysis in loop structure2010 The 2nd International Conference on Computer and Automation Engineering (ICCAE)10.1109/ICCAE.2010.5451995(76-80)Online publication date: Feb-2010
  • (2008)Fast bounds checking using debug registerProceedings of the 3rd international conference on High performance embedded architectures and compilers10.5555/1786054.1786066(99-113)Online publication date: 27-Jan-2008
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media