Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/93542.93581acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free access

A fresh look at optimizing array bound checking

Published: 01 June 1990 Publication History
  • Get Citation Alerts
  • 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
    • (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
    • (2012)On-the-fly structure splitting for heap objectsACM Transactions on Architecture and Code Optimization10.1145/2086696.20867058:4(1-20)Online publication date: 26-Jan-2012
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    PLDI '90: Proceedings of the ACM SIGPLAN 1990 conference on Programming language design and implementation
    June 1990
    351 pages
    ISBN:0897913647
    DOI:10.1145/93542
    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 1990

    Permissions

    Request permissions for this article.

    Check for updates

    Qualifiers

    • Article

    Acceptance Rates

    Overall Acceptance Rate 406 of 2,067 submissions, 20%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)43
    • Downloads (Last 6 weeks)7
    Reflects downloads up to 11 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (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
    • (2012)On-the-fly structure splitting for heap objectsACM Transactions on Architecture and Code Optimization10.1145/2086696.20867058:4(1-20)Online publication date: 26-Jan-2012
    • (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)CETSACM SIGPLAN Notices10.1145/1837855.180665745:8(31-40)Online publication date: 5-Jun-2010
    • (2010)CETSProceedings of the 2010 international symposium on Memory management10.1145/1806651.1806657(31-40)Online publication date: 5-Jun-2010
    • (2009)Array Bounds Check Elimination for Java Based on Sparse RepresentationProceedings of the 2009 Seventh ACIS International Conference on Software Engineering Research, Management and Applications10.1109/SERA.2009.11(189-196)Online publication date: 2-Dec-2009
    • (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
    • (2008)A practical and precise inference and specializer for array bound checks eliminationProceedings of the 2008 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation10.1145/1328408.1328434(177-187)Online publication date: 7-Jan-2008
    • (2008)Fast Bounds Checking Using Debug RegisterHigh Performance Embedded Architectures and Compilers10.1007/978-3-540-77560-7_8(99-113)Online publication date: 2008
    • 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