Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

A fresh look at optimizing array bound checking

Published: 01 June 1990 Publication History

Abstract

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 eliminated by compile-time analysis. The optimizations reduce the program execution time and the object code size through elimination of redundant checks, propagation of checks out of loops, and combination of multiple checks into a single check. A minimal control flow graph (MCFG) is constructed using which the minimal amount of data flow information required for range check optimizations is computed. The range check optimizations are performed using the MCFG rather the CFG for the entire program. This allows the global range check optimizations to be performed efficiently since the MCFG is significantly smaller than the CFG. Any array bound violation that is detected by a program with all range checks included, will also be detected by the program after range check optimization and vice versa. Even though the above optimizations may appear to be similar to traditional code optimizations, similar reduction in the number of range checks executed can not be achieved by a traditional code optimizer. Experimental results indicate that the number of range checks performed in executing a program is greatly reduced using the above techniques.

References

[1]
A.V. Aho, R. Sethi, and J.D. Ullman, Compilers: Principles, Techniques, and Tools, Addison-Wesley, 1986.
[2]
D. Callahan, K.D. Cooper, K. Kennedy, and L. Torczon, "Interprocedural Constant Propagation," Proceedings 14th ACM Symposium on Principles of Programming Languages, pp. 152-161, 1986.
[3]
F. Chow, "A Portable Machine-independent Global Optimizer- Design and Measurements,'' Ph.D. Thesis, Technical Report 83- 254,2omputer Sytems Lab, Stanford University, Dec., 1983.
[4]
W. Harrison, "Compiler Analysis of the Value Ranges for Variables," IEEE Transactions on Software Engineering, vol. 3, no. 3, pp. 243-250, 1977.
[5]
J. Hennessy, "Symbolic Debugging of Optimized Code," Trans. on Programming Languages and Systems, vol. 4, no. 3, pp. 323-344, July, 1982.
[6]
N. Suzuki and K. Ishihata, "implementation of Array Bound Checker," Proceedings with ACM Symposium on Principles of Programming Languages, pp. 132-143, 1977.
[7]
M.N. Wegman and F.K. Zadeck, "Constant Propagation with Conditional Branches," Proceedings 12th A CM Symposium on Principles of Programming Languages, pp. 152-161, 1984.
[8]
V. Markstein, J. Cocke, and P. Markstein, "Optimization of Range Checking," Proceedings of SIGPLAN'S2 Symposium on Compiler Oonstruction, 1982.

Cited By

View all
  • (2014)Exploiting array manipulation habits to optimize garbage collection and type flow analysisSoftware: Practice and Experience10.1002/spe.230045:12(1639-1657)Online publication date: 24-Nov-2014
  • (2010)Profile-Guided Compiler OptimizationsThe Compiler Design Handbook10.1201/9781420040579.ch4Online publication date: 7-Mar-2010
  • (2007)Flow-Sensitive Loop-Variant Variable Classification in Linear TimeLanguages and Compilers for Parallel Computing10.1007/978-3-540-85261-2_22(323-337)Online publication date: 1-Oct-2007
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

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]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 June 1990
Published in SIGPLAN Volume 25, Issue 6

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)70
  • Downloads (Last 6 weeks)28
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2014)Exploiting array manipulation habits to optimize garbage collection and type flow analysisSoftware: Practice and Experience10.1002/spe.230045:12(1639-1657)Online publication date: 24-Nov-2014
  • (2010)Profile-Guided Compiler OptimizationsThe Compiler Design Handbook10.1201/9781420040579.ch4Online publication date: 7-Mar-2010
  • (2007)Flow-Sensitive Loop-Variant Variable Classification in Linear TimeLanguages and Compilers for Parallel Computing10.1007/978-3-540-85261-2_22(323-337)Online publication date: 1-Oct-2007
  • (2005)Executable assertions and separate compilationModular Programming Languages10.1007/3-540-62599-2_29(41-52)Online publication date: 2-Jun-2005
  • (2005)Extent analysis of data fieldsStatic Analysis10.1007/3-540-58485-4_42(208-222)Online publication date: 8-Jun-2005
  • (1997)Interprocedural conditional branch eliminationACM SIGPLAN Notices10.1145/258916.25892932:5(146-158)Online publication date: 1-May-1997
  • (1997)Interprocedural conditional branch eliminationProceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation10.1145/258915.258929(146-158)Online publication date: 1-May-1997
  • (1991)Using Write Protected Data Structures To Improve Software Fault Tolerance in Highly Available Database Management SystemsProceedings of the 17th International Conference on Very Large Data Bases10.5555/645917.672163(171-180)Online publication date: 3-Sep-1991
  • (2021)Towards More Reliable Automated Program Repair by Integrating Static Analysis Techniques2021 IEEE 21st International Conference on Software Quality, Reliability and Security (QRS)10.1109/QRS54544.2021.00075(654-663)Online publication date: Dec-2021
  • (2015)Exploiting array manipulation habits to optimize garbage collection and type flow analysisSoftware—Practice & Experience10.1002/spe.230045:12(1639-1657)Online publication date: 1-Dec-2015
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media