Eliminating partially-redundant array-bounds check in the Android Dalvik JIT compiler

  • Authors:
  • Javed Absar;Deepak Shekhar

  • Affiliations:
  • Samsung, Bangalore, India;Samsung, Bangalore, India

  • Venue:
  • Proceedings of the 9th International Conference on Principles and Practice of Programming in Java
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

The Android operating system has transformed the mobile software platform landscape significantly. A significant component of the Android is the Dalvik Virtual Machine (DVM) that interprets client applications' codes written in Java and compiled to dexcode. Since interpretation is inherently slow, virtual machines typically employ just-in-time (JIT) compilation. In the Froyo 2.2 release of Android, DVM added a JIT compiler that selectively compiles hot-traces to native ARM code. Some crucial optimizations such as array bounds-check optimization have been implemented in the DVM-JIT compiler. DVM implements an extension of the state-of-the-art in optimization of partially-redundant array-bounds check, which is the approach of Wurthinger et al. as implemented in Java Hot-Spot Compiler. That technique has a limitation that it can optimize bounds checks only for indices that are "iterator plus a constant". In this paper, we tackle that problem by proposing an extension that can handle indices that are "affine functions of iterators, loop-invariants and literals". Our extension is fast and is implemented into the DVM JIT compiler.