CC 2002: Compiler Construction pp 325-341

A Comprehensive Approach to Array Bounds Check Elimination for Java

  • Feng Qian
  • Laurie Hendren
  • Clark Verbrugge
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2304)

Abstract

This paper reports on a comprehensive approach to eliminating array bounds checks in Java. Our approach is based upon three analyses. The first analysis is a flow-sensitive intraprocedural analysis called variable constraint analysis (VCA). This analysis builds a small constraint graph for each important point in a method, and then uses the information encoded in the graph to infer the relationship between array index expressions and the bounds of the array. Using VCA as the base analysis, we also show how two further analyses can improve the results of VCA. Array field analysis is applied on each class and provides information about some arrays stored in fields, while rectangular array analysis is an interprocedural analysis to approximate the shape of arrays, and is useful for finding rectangular (non-ragged) arrays.

We have implemented all three analyses using the Soot bytecode optimization/ annotation framework and we transmit the results of the analysis to virtual machines using class file attributes. We have modified the Kaffe JIT, and IBM’s High Performance Compiler for Java (HPCJ) to make use of these attributes, and we demonstrate significant speedups.

Copyright information

© Springer-Verlag Berlin Heidelberg 2002

Authors and Affiliations

  • Feng Qian
    • 1
  • Laurie Hendren
    • 1
  • Clark Verbrugge
    • 1
  1. 1.School of Computer ScienceMcGill UniversityUSA

Personalised recommendations