llvm backend for gcjx

Jakob Praher jpraher@yahoo.de
Sun Dec 4 11:56:00 GMT 2005

Hi Mike,

thank you very much for your response.

On Sam, 2005-12-03 at 21:08 -0600, Mike Emmel wrote:
> Hi Jakob I'm currently studying the LLVM gcc 4.0 patches and the
> current gcjx gcc and bytecode backends code to do the tree to tree
> conversions. The code is currently just on my hard drive I've not 
> checked it in.
> Its in a very early state I have a a gcjx tree vistor compiling and
> the llvm backend hooked in I was just starting on converting the
> method signatures. I'm just now doing the type conversions right now. 
> So as you can see its very early.

Ok. so what you do is use the gcc llvm c bindings to emit the llvm
bytecode? Or do you use the native C++ API for generating
llvm::Modules ?

> I'm using the llvm build system but as I work on the project it seems
> that it should be moved to be a sub project of the gcjx library like
> the bytecode emitter. I can use the gcc 4.0 llvm code to see how to
> link using gcc's build system.
I am using that too in my project. But I've changed the configure
subsystem to work in a separate location. Yeah integrating the system
with the gcc build system is interesting/challenging. The LLVM build
system is nice in that it follows the BSD make tradition. I haven't
looked at the gcc-llvm-emitter API right now. I am using the native C++
API to work with. In the latter there is quite some magic wrapped in the
Makefile.rules file. But on the other hand, it is a gcc tradition to
configure dependent autonomous subprojects. So what you could do is,
like I did it in my case, separate your LLLVM code completly from the
LLVM project and mount it as a subproject in the gcc code tree (I think
Tom did that for the gcjx too). Then, if enabled, the llvm subsystem
will be configured as a standalone LLVM project.

> I'd be happy to put a tarball somewhere even though its still very
> very early. Even at this stage llvm is very nice to work with the C
> emitter is great for this type of work.
> I don't miss the gcc tree's one bit :)

Yes the LLVM API is quite nice. (Everything is a llvm::Value, Instead of
everything is a Tree)
I would be very happy if you could make a tarball or a patchset of your
changes to the gcjx. 
-- Jakob

> Mike
> On 12/3/05, Jakob Praher <jpraher@yahoo.de> wrote:
> > hi Mike,
> > hi all,
> >
> > I'm currently pretty busy. But I saw that you are working on a LLVM
> > backend for gcjx - great.
> >
> > Do you have the source code somewhere. If my time permits it, I'd like
> > to help you in implemneting it, I have some experience with LLVM (I am
> > doing my master thesis project on it).
> >
> > What are your design plans?
> > I have some experience with the LLVM JIT and JITEmitter things. Perhaps
> > we could discuss that a little bit.
> >
> > cheers
> > -- Jakob
> >
> >

More information about the Java mailing list