This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcjx llvm backend
On 11/28/05, Bryce McKinlay <mckinlay@redhat.com> wrote:
> Mike Emmel wrote:
>
> >>Cool. Just to make sure I understand this correctly, you'd
> >>be adding support to the standalone GCJX compiler (stuff
> >>in the "gcjx" folder) to optinally emit LLVM bytecode,
> >>apart from the usual JVM bytecode, right?
> >>
> >>
> >>
> >Yes but llvm is also a full compiler backend so you can do
> >llvm bytecode->jit and direct machine code.
> >The one part thats not quite there would be to integrate with the java
> >bytecode interpeter
> >to convert to llvm on the fly ie a java jit. My primary use case is
> >for compiled java libraries and large java programs if those can be
> >compiled to llvm bytecode and readily jited to high quality machine
> >code with caching I'm not sure that a complex java bytecode jit is
> >really needed. Hotspot spends 99% of its time jitting the core class
> >libraries yet one more time.
> >
> >
>
> Note that as of Sun's Java 1.5, Hotspot now has a precompiled cache of
> the core class libraries - so they've actually implemented a kind of
> pre-compilation in order to improve startup time. Of course, it can
> still go back and recompile parts of those classes with runtime
> optimizations, inlining, etc as needed.
>
> In any case, LLVM integration is a really cool project - using LLVM and
> sharing parts of gcjx with libgcj so that the same code can be used to
> implement AOT compilation and runtime (JIT) compilation could hold some
> interesting possibilities.
>
> Bryce
>
>
True but I think the biggest gain will be to optimize acros the jni
barrier right now llvm seems to be the only open technology where that
sort of cross language optimization is possible.
If I'm right then it would push python ruby etc to look at this type
of technology.
I'm still a bit hazy on how to do the libgcj integration myself but
lets see when we actually have something.
As far as suns precompiled cache I know its a shared library but I
think its only the runtime format of the classes i.e there preloaded
and resolved and stored in a shared library I don't think they have
been natively compiled.