[LLVMdev] Re: Newbie questions

Tom Tromey tromey at redhat.com
Wed Apr 26 18:14:54 PDT 2006

>>>>> "Archie" == Archie Cobbs <archie at dellroad.org> writes:

Are we bugging the LLVM folks with all this JVM talk?  We could find
(or make) another list to discuss this.

Archie> E.g. devirtualization: this requires knowing the Java type
Archie> (not LLVM type) of an object. But once you compile to LLVM,
Archie> that information is lost.

Archie> If e.g. you're loading LLVM pre-compiled modules then you can
Archie> never do this optimization because you can't recover the Java
Archie> type information (which is front-end specific).

I'm sure you know that precompilation of Java code is already super
tricky.  To be compatible you have to defer most things anyway.
But... I think I don't understand your situation that well.

In the JIT, devirtualization looks doable, though somewhat fiddly.  At
least, that is true for straightforward things like calls to methods
in final classes, or calls to methods on objects allocated with 'new'
in the current function.  (The latter could be done AOT, at least if
you defined a way to do the appropriate runtime link; I've considered
it for gcj.)


More information about the llvm-dev mailing list