Transient variable caching in Java’s stack-based intermediate representation

  • Authors:
  • Paul Tý/ma

  • Affiliations:
  • Syracuse University, 26250 Euclid Ave. &num/503, Euclid, OH 44132, USA Tel.&colon/ +1 216 732 5895&semi/ Fax&colon/ +1 216 732 5897&semi/ E-mail&colon/ ptyma@cat.syr.edu

  • Venue:
  • Scientific Programming
  • Year:
  • 1999

Quantified Score

Hi-index 0.00

Visualization

Abstract

Java’s stack-based intermediate representation (IR) is typically coerced to execute on register-based architectures. Unoptimized compiled code dutifully replicates transient variable usage designated by the programmer and common optimization practices tend to introduce further usage (i.e., CSE, Loop-invariant Code Motion, etc.). On register based machines, often transient variables are cached within registers (when available) saving the expense of actually accessing memory. Unfortunately, in stack-based environments because of the need to push and pop the transient values, further performance improvement is possible. This paper presents Transient Variable Caching (TVC), a technique for eliminating transient variable overhead whenever possible. This optimization would find a likely home in optimizers attached to the back of popular Java compilers. Side effects of the algorithm include significant instruction reordering and introduction of many stack-manipulation operations. This combination has proven to greatly impede the ability to decompile stack-based IR code sequences. The code that results from the transform is faster, smaller, and greatly impedes decompilation.