A Language Independent JIT compiler library

Student:Stefan Kempf
Title:A Language Independent JIT compiler library
Type:diploma thesis
Advisors:Veldema, R.; Philippsen, M.
State:submitted on April 20, 2009
Prerequisits:

At our chair we have developed a virtual machine for Java programs that is especially suited for managing large numbers of objects, called LVM (Large-object-space Virtual Machine).
While LVM is far better than the JDK when the number of objects in a Java program is very large, it is also far slower if the number of objects is small. To improve this situation, we need a good JIT compiler (Just-In-Time compiler) that compiles intermediate/bytecode at runtime to machine code. A function would then run in interpreted mode for a while (slow) before it is compiled by (your new) JIT to machine code (fast).
The current version of LVM accepts LVM bytecodes and interpretes them to run the program. A simple JIT has already been written that, at run time, compiles the LVM-bytecodes to C code, compiles it to a shared library with a normal C compiler and dynamically links the result in.
While this C-based JIT works and the quality of the generated code is in very good, it is very slow (as slow as the C compiler runs). A different approach would be to have a fast JIT that produces moderate to good code and that can then be later exchanged for the very good C-based JIT generated code if needed.

Topic:

Build a JIT library that allows moderately good code to be generated from the machine-independent LVM bytecode. Initially we will target only one architecture with the library, namely X86-64 to limit the DA's complexity. The C code generated by the C-based JIT can be used as a template.
In cooperation with you, we will decide to either extend/reuse an existing JIT library such as LLVM ( http://www.llvm.org/ ), GNU lightning ( http://www.gnu.org/software/lightning/ ), LibJIT, C-- ( http://www.cminusminus.org/index.html ), rip a JIT library from an existing Java-JIT/JVM such as OpenJDK and modularize it, or build our own depending on your preferences/goals/ideas/interests.
Regardless of approach, we should end up with a modular JIT library that generates moderately good code for LVM bytecode. Preferably, the JIT would be language/JIT/bytecode/target agnostic to be able to reuse it with a different JIT.

Note: this DA can be done in either German or English.
Literatur: LLVM ( http://www.llvm.org/ ), LVM ( http://www2.cs.fau.de/publication/download/LCPC_LVM.pdf )

watermark seal