Effective sign extension elimination

M Kawahito, H Komatsu, T Nakatani - ACM SIGPLAN Notices, 2002 - dl.acm.org
ACM SIGPLAN Notices, 2002dl.acm.org
Computer designs are shifting from 32-bit architectures to 64-bit architectures, while most of
the programs available today are still designed for 32-bit architectures. Java™, for example,
specifies the frequently used int" as a 32-bit data type. If such Java programs are executed
on a 64-bit architecture, many 32-bit values must be sign-extended to 64-bit values for
integer operations. This causes serious performance overhead. In this paper, we present a
fast and effective algorithm for eliminating sign extensions. We implemented this algorithm in …
Computer designs are shifting from 32-bit architectures to 64-bit architectures, while most of the programs available today are still designed for 32-bit architectures. Java™, for example, specifies the frequently used int" as a 32-bit data type. If such Java programs are executed on a 64-bit architecture, many 32-bit values must be sign-extended to 64-bit values for integer operations. This causes serious performance overhead. In this paper, we present a fast and effective algorithm for eliminating sign extensions. We implemented this algorithm in the IBM Java Just-in-Time (JIT) compiler for IA-64™. Our experimental results show that our algorithm effectively eliminates the majority of sign extensions. They also show that it significantly improves performance, while it increases JIT compilation time by only 0.11%. We implemented our algorithm for programs in Java, but it can be applied to any language requiring sign extensions.
ACM Digital Library