This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcjx llvm backend


On 11/28/05, Ranjit Mathew <rmathew@gmail.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> [Note: I have only a cursory knowledge of LLVM.]
>
> Mike Emmel wrote:
> > Hi all I've started work on a llvm backend for gcjx.  I just started
> > two days ago but I've gotten the gcjx library to compile as and
> > external project for llvm and and writing a simple driver right now.
> >
> > I asked Tom Tromey about this and no one has tried it yet. Anyway I'd
> > be happy to send my work to date to any cvs repository llvm or gcc or
> > other if others are intrested. I've not contacted any llvm folks about
> > this project yet.
>
> 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.

I'm not saying you don't want a runtime jit but it can be relegated to
catching some simple cases inside methods and does not need to be a
full blown compiler system. If you want the code to be fast then pre
jit it to llvm bytecode at install time.

> I'm not sure if you are aware of it or not, but Chris
> Lattner has proposed:
>
>   http://gcc.gnu.org/ml/gcc/2005-11/msg00888.html
>
> that LLVM be integrated into GCC. If this comes through,
> it would be one of the most significant improvements
> in GCC in recent times (apart from Tree-SSA).
>
> Of course, it might *not* happen as well.
>
> Irrespective of this however, I guess it would still
> be very useful for GCJX to be a standalone Java
> compiler and yet be able to create optimised binaries
> using LLVM.
>

I read that message also I've been looking at llvm for a while its a
cool project.
With his announcement on the list and the fact it seems he is at apple
now I feel llvm will grow to be a quality backend. Also for java the
ability to compile through jni calls will signifcantly speed up the
libraries plus the jit etc. I think the llvm will result in a compiler
that produces significantly faster code for java (C++ for that matter)
 so I think its the way to go.
Also having a direct frontend will I think really help both projects.

Mike

> Thanks,
> Ranjit.
>
> - --
> Ranjit Mathew      Email: rmathew AT gmail DOT com
>
> Bangalore, INDIA.    Web: http://ranjitmathew.hostingzero.com/
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (MingW32)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFDiqb/Yb1hx2wRS48RAlu3AKCogDEovyMuGHk/ddauyK8kpxl4xQCfYTuf
> TGuzvOfb6WF8HpB+9xo+NzQ=
> =/wKf
> -----END PGP SIGNATURE-----
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]