skip to main content
10.1145/378795.378850acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article

Related field analysis

Published:01 May 2001Publication History

ABSTRACT

We present an extension of field analysis (sec [4]) called related field analysis which is a general technique for proving relationships between two or more fields of an object. We demonstrate the feasibility and applicability of related field analysis by applying it to the problem of removing array bounds checks. For array bounds check removal, we define a pair of related fields to be an integer field and an array field for which the integer field has a known relationship to the length of the array. This related field information can then be used to remove array bounds checks from accesses to the array field. Our results show that related field analysis can remove an average of 50% of the dynamic array bounds checks on a wide range of applications.

We describe the implementation of related field analysis in the Swift optimizing compiler for Java, as well as the optimizations that exploit the results of related field analysis.

References

  1. 1.R. Bodik, R. Gupta, and V. Sarkar. ABCD: Eliminating Array Bounds Checks on Demand. In Proceedings of the ACM SIGPLAN '00 Conference on Programming Language Design and Implementation (PLDI), pages 321-333, June 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.Compaq Computer Corporation. Compaq Fast Virtual Machine V1.2.2-4 for Alpha. At URL http://www. compaq.com/java.Google ScholarGoogle Scholar
  3. 3.D. L. Detlefs, K. R. M. Leino, G. Nelson, and J. B. Saxe. Extended Static Checking. Technical Report 159, Compaq, 1998.Google ScholarGoogle Scholar
  4. 4.S. Ghemawat, K. H. Randall, and D. J. Scales. Field Analysis: Getting Useful and Low-cost Interprocedural Information. In Proceedings of the ACMSIGPLAN '00 Conference on Programming Language Design and Implementation (PLDI), pages 334-344, June 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.W. Harrison. Compiler analysis for the value ranges of variables. IEEE Transactions on Software Engineering, 3(3):243- 250, May 1977.Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.P. Kolte and M. Wolfe. Elimination of Redundant Array Subscript Range Checks. In Proceedings of the SIGPLAN '95 Conference on Program Language Design and Implementation, June 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.V. Markstein, J. Cocke, and P. Markstein. Optimization of Range Checking. In Proceedings of the SIGPLAN '82 Symposium on Compiler Construction, June 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.G. C. Necula. Compiling with Proofs. PhD thesis, Carnegie Mellon University, Oct. 1998. Available as tech report CMU- CS-98-154. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.J. R. Patterson. Accurate Static Branch Prediction by Value Range Propagation. In Proceedings of the SIGPLAN '95 Conference on Program Language Design and Implementation, pages 67-78, June 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.R. Rugina and M. Rinard. Symbolic Bounds Analysis of Pointers, Array Indices, and Accessed Memory Regions. In Proceedings of the ACM SIGPLAN '00 Conference on Programming Language Design and Implementation (PLDI), pages 182-195, June 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.D. J. Scales, K. H. Randall, S. Ghemawat, and J. Dean. The Swift Java Compiler: Design and Implementation. Technical Report 2000/2, Compaq Western Research Laboratory, Apr. 2000.Google ScholarGoogle Scholar
  12. 12.N. Suzuki and K. Ishihata. Implementation of an array bound checker. In Conference Record of the Fourth ACM Symposium on Principles of Programming Languages, pages 132- 143, Jan. 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.Z. Xu, B. P. Miller, and T. Reps. Safety Checking of Machine Code. In Proceedings of the ACM SIGPLAN '00 Conference on Programming Language Design and Implementation (PLDI), pages 70-82, June 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Related field analysis

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        PLDI '01: Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation
        June 2001
        331 pages
        ISBN:1581134142
        DOI:10.1145/378795

        Copyright © 2001 ACM

        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: 1 May 2001

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        PLDI '01 Paper Acceptance Rate30of144submissions,21%Overall Acceptance Rate406of2,067submissions,20%

        Upcoming Conference

        PLDI '24

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader