Effective Null Pointer Check Elimination Utilizing Hardware Trap

Copyright © (2000) by Association for Computing Machinery, Inc. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distrubuted for profit or commericial advantage. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior specific permission and/or a fee.

We present a new algorithm for eliminating null pointer checks from programs written in JavaTM. However, the same approach should work for any languages requiring null checking. Our new algorithm moves null checks backwards and eliminates redundant null checks. This increases the opportunities for other optimizations to be applied by eliminating many null checks that impede code motion. In a separate pass, it moves null checks forwards and converts many null checks to hardware traps in order to minimize the execution costs for the remaining null checks. This algorithm has been implemented in the IBM 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 previously known algorithms.

By: Motohiro Kawahito, Hideaki Komatsu, and Toshio Nakatani

Published in: ACM SIGPLAN Notices, volume 35, (no 11), pages 139-149 in 2000

LIMITED DISTRIBUTION NOTICE:

This Research Report is available. This report has been submitted for publication outside of IBM and will probably be copyrighted if accepted for publication. It has been issued as a Research Report for early dissemination of its contents. In view of the transfer of copyright to the outside publisher, its distribution outside of IBM prior to publication should be limited to peer communications and specific requests. After outside publication, requests should be filled only by reprints or legally obtained copies of the article (e.g., payment of royalties). I have read and understand this notice and am a member of the scientific community outside or inside of IBM seeking a single copy only.

rt0356.pdf

Questions about this service can be mailed to reports@us.ibm.com .