Check out the new USENIX Web site. next up previous
Next: Benchmarks Up: Harissa: a Flexible and Previous: Overview of Harissa

Related Work


Other Off-line Compilers

To our knowledge, there are two other compilers from bytecode to C: J2C and Toba. Harissa is the only environment that integrates an interpreter. J2C performs no optimizations when generating C code (i.e., stack evaluation or method call optimization). It is still immature and fails for many applications. Toba does a stack analysis similar to the one included in Harissa and generates C code from which transient variables have been eliminated. However, Toba does not do any method call optimizations. Currently, Toba is slightly more mature than Harissa since it supports threads.

Previous Work in CHA

Compilers for other object-oriented languages have included a CHA to optimize dynamically dispatched calls. In [24], Vortex, an optimizing compiler for object-oriented languages is presented. Vortex differs from Harissa in the following ways. It is a language-independent compiler with front-ends for Java, Cecil, C++, and Modula-3. Vortex takes as input source code. This approach limits its domain of use in the case of Java since source code is often not available. The optimizations it performs range from standard ones, such as constant propagation, dead code elimination, and method inlining, to optimizations specific to object-oriented languages, such as intra-procedural static class analysis, class hierarchy analysis [11], and profile-guided class receiver prediction [21]. The Vortex compiler has been used to study the impact of each of these optimizations alone and in combination. In [11], it is shown that class hierarchy analysis and profile-guided class receiver prediction are complementary transformations: the combination of the two produces a compounding effect.

Fernandez presents an optimizing linker that does class hierarchy analysis of Modula-3 programs [25]. Optimizations and code generation are done at link-time. The problem with this approach is that further optimizations that can result from transforming virtual calls into static procedure calls cannot be done by the compiler. An optimizing source-to-source C++ compiler is presented in [26]. The number of virtual method calls are reduced by performing both type feedback [27] and class hierarchy analysis. Method inlining is done as well. The optimized program is compiled by a native host C++ compiler.



Figure 4: Execution time normalized to Harissa

next up previous
Next: Benchmarks Up: Harissa: a Flexible and Previous: Overview of Harissa

Gilles Muller
Wed Apr 30 16:15:21 MET DST 1997