[LLVMdev] GSoC 2011: Fast JIT Code Generation for x86-64
Viktor Pavlu
vpavlu at gmail.com
Fri Apr 1 06:53:52 PDT 2011
Hi All,
I'd like to propose a fast path through code generation for x86-84 in
the JIT execution engine as part of 2011's Google Summer of Code
program.
While the LLVM-JIT is very popular as a first try at jitting
programming languages, projects have abandoned the LLVM-JIT when
disappointed with the overall runtime. The problem is, that the
benefit of faster execution is traded for longer compile time -- which
only pays off for code that is executed frequently. One solution to
this problem is an adaptive compilation scheme with separate compile
strategies for cold and hot code.
The aim of my project is to create the fast path for code that is
compiled the first time in such an adaptive compilation scheme: a code
generator that produces unoptimized code in a very short time.
I plan to implement a two-pass (almost) linear code generator
specifically for x86-64 that
- performs analyses (e.g. live-range analysis) on LLVM-IR in the
first pass and
- then generates x86-64 instructions directly from IR in a second
pass that writes to the executable memory (e.g. in
X86CodeEmitter.cpp),
circumventing the more expensive backend passes.
This code generator can then be part of an adaptive compilation
framework within LLVM (a GSoC proposal in this direction is currently
discussed on the llvm-dev mailing list[1]), or from outside of LLVM --
the latter being my main motivation.
I currently work on generating fast cycle-accurate simulators[2]. For
this, our institute has implemented a two-part adaptive compilation
scheme using the LLVM-JIT. Although most optimizations are turned off
already and the FastISel instruction selector is used, the "fast" path
for first-time code generation is still the bottleneck of the
simulators. This is for the largest part due to the SelectionDAG
instruction selection process, hence the motivation for a simpler,
two-pass code generator.
As for my personal details, I'm a PhD student at Vienna University of
Technology (TU Wien) with a strong background in compiler theory,
acquired in a wide variety of undergradute- and graduate-level
courses.
I appreciate any suggestions and would be very excited if someone is
interested in mentoring this.
Please note that I'm offline until April 4, so I cannot respond before
next Tuesday.
- Viktor Pavlu
---
[1]: GSoC Proposal: Adaptive Compilation Framework for LLVM JIT Compiler
http://groups.google.com/group/llvm-dev/browse_thread/thread/b4dfd837e208f9dc/
[2]: Optimal Code Generation for Explicitly Parallel Processors
http://www.complang.tuwien.ac.at/epicopt/
More information about the llvm-dev
mailing list