Optimizing Java Bytecode Using the Soot Framework: Is It Feasible?

  • Authors:
  • Raja Vallée-Rai;Etienne Gagnon;Laurie J. Hendren;Patrick Lam;Patrice Pominville;Vijay Sundaresan

  • Affiliations:
  • -;-;-;-;-;-

  • Venue:
  • CC '00 Proceedings of the 9th International Conference on Compiler Construction
  • Year:
  • 2000

Quantified Score

Hi-index 0.00

Visualization

Abstract

This paper presents Soot, a framework for optimizing Java™ bytecode. The framework is implementedin Java and supports three intermediate representations for representing Java bytecode: Baf, a streamlined representation of Java's stack-based bytecode; Jimple, a typed three-address intermediate representation suitable for optimization; and Grimp, an aggregated version of Jimple. Our approach to class file optimization is to first convert the stack-based bytecode into Jimple, a three-address form more amenable to traditional program optimization, and then convert the optimized Jimple back to bytecode. In order to demonstrate that our approach is feasible, we present experimental results showing the effects of processing class files through our framework. In particular, we study the techniques necessary to effectively translate Jimple back to bytecode, without losing performance. Finally, we demonstrate that class file optimization can be quite effective by showing the results of some basic optimizations using our framework. Our experiments were done on ten benchmarks, including seven SPECjvm98 benchmarks, and were executedon five different Java virtual machine implementations.