Effective null pointer check elimination utilizing hardware trap

  • Authors:
  • Motohiro Kawahito;Hideaki Komatsu;Toshio Nakatani

  • Affiliations:
  • IBM Tokyo Research Laboratory, 1623-14, Shimotsuruma, Yamato, Kanagawa, 242-8502, Japan;IBM Tokyo Research Laboratory, 1623-14, Shimotsuruma, Yamato, Kanagawa, 242-8502, Japan;IBM Tokyo Research Laboratory, 1623-14, Shimotsuruma, Yamato, Kanagawa, 242-8502, Japan

  • Venue:
  • ASPLOS IX Proceedings of the ninth international conference on Architectural support for programming languages and operating systems
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a new algorithm for eliminating null pointer checks from programs written in Java™. Our new algorithm is split into two phases. In the first phase, it moves null checks backward, and it is iterated for a few times with other optimizations to eliminate redundant null checks and maximize the effectiveness of other optimizations. In the second phase, it moves null checks forward and converts many null checks to hardware traps in order to minimize the execution cost of the remaining null checks. As a result, it eliminates many null checks effectively and exploits the maximum use of hardware traps. This algorithm has been implemented in the IBM cross-platform Java Just-in-Time (JIT) compiler. Our experimental results show that our approach improves performance by up to 71% for jBYTEmark and up to 10% for SPECjvm98 over the previously known best algorithm. They also show that it increases JIT compilation time by only 2.3%. Although we implemented our algorithm for Java, it is also applicable for other languages requiring null checking.