[LLVMdev] Re: LLVM-based JVM JIT for libgcj
Jakob Praher
jp at hapra.at
Tue Apr 18 13:48:16 PDT 2006
hi Tom,
I am really glad that someone has found time to step into that :-).
Tom Tromey wrote:
> I recently wrote an LLVM-based JIT plugin for libgcj and I thought
> it'd be worthwhile to mention it here.
>
> It is in cvs on sourceforge, but afaics anonymous cvs there is pretty
> broken at the moment... so if you want a copy, ask and I will email it
> to you.
wow. that is really nice.
I was looking for some contractor for working more on LLVM, but it is
sad that I did not succeed as far.
I would definitely like to look into it.
>
>
> Basically I hacked libgcj to (optionally) dynamically load JIT module
> at startup. If a JIT is loaded then bytecode is passed to it rather
> than to the libgcj bytecode interpreter.
>
> The LLVM JIT is pretty raw at the moment. It can run "hello world"
> and a few microbenchmarks (empty loops, method calls, that sort of
> thing). I haven't tested it seriously yet. On my little benchmarks
> it is 5x-6x faster than our interpreter.
>
Looks promising.
> Exception handling definitely does not work, I didn't even try to
> implement it yet. I've been thinking about having some kind of simple
> bridge between the LLVM and GCC worlds here -- very inefficient, but
> at least I could get it working rather quickly. Long term I'm hoping
> someone else will be solving this problem... :-)
>
I would offer some help. But as I have always told because of a lack of
money supporting me, I have just my very scarce free time.
>
> FWIW I actually did this work twice, once for libjit and once for
> LLVM. I'm happy to provide a comparison, from a jit-writing
> perspective, if you're interested.
Yes very much! How did you find writing it directly in SSA-form. What is
the footprint of libjit compared to the more heavy LLVM jit? How about
recompiling in libjit? Has it support for CFG, dataflow analysis?
>
> Thanks for writing LLVM. It is awesome to be able to add a JIT to
> libgcj this easily.
Yes kudos to the LLVM people!
-- Jakob
More information about the llvm-dev
mailing list