[LLVMdev] Introduction and questions

Gary Benson gbenson at redhat.com
Wed Apr 2 02:55:17 PDT 2008


Hi all,

I've been working on making a non-architecture specific port of
OpenJDK these past few months.  It's interpreter-only at present,
and very slow, and I'd like to use LLVM to add some kind of JIT
to it.

So far I'm just trying to figure out how it would all slot in.
The existing code in OpenJDK is written to accomodate different
JITs, so integrating peripheral stuff like garbage collection
seems pretty simple, but method dispatch seems like it will be
tricky.  The examples I've seen require an ExecutionEngine to
execute code.  Is it possible to bypass this and get a function
pointer?  So you could use it like this:

  typedef void (*function_t)(methodOop method, JavaThread *thread);
  function_t func = [some LLVM call here];
  func(method, thread);

That would solve pretty much all my problems :)

Cheers,
Gary

-- 
http://gbenson.net/



More information about the llvm-dev mailing list