This is the mail archive of the
mailing list for the GCC project.
Re: GCC-Bridge: A Gimple Compiler targeting the JVM
- From: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- To: "Bertram, Alexander" <alex at bedatadriven dot com>, gcc at gcc dot gnu dot org
- Date: Mon, 1 Feb 2016 21:25:08 +0000
- Subject: Re: GCC-Bridge: A Gimple Compiler targeting the JVM
- Authentication-results: sourceware.org; auth=none
- References: <CAOdV3zBHNvWMBPwkybvPzc9_yMndeP2bnxsXNGCbocwTHbPSWQ at mail dot gmail dot com>
On 01/02/16 12:34, Bertram, Alexander wrote:
I wanted to share a project we've been working on for sometime within
the context of Renjin,
a new interpreter for the R language running on the JVM.
We basically needed a way to compile C and Fortran code to JVM
classes, and for the last year or two we've been working on tool chain
that's composed of a GCC plugin which dumps Gimple trees out to a JSON
file, and a Java program which reads the JSON and compiles it to Java
This sounds interesting! (R is so slow)
1) Wouldn't it be better to directly compile to Java bytecode? I think GJC was
able to do that in the past, but I'm not sure how bit-rotted that code is by
now. https://gcc.gnu.org/ml/gcc/2000-02/msg00161.html It may be a more robust
solution in the long run.
2) The reason that R uses so much C and Fortran code is because when compiled,
that code is much faster than R. How much is lost by compiling and running in JVM?
3) Gimple is not completely target independent, but I think we would like to
move towards that direction, so reporting bugs about that with specific
testcases may be helpful. Of course, a JVM target would make this concern
Anyway, using the GCC plugin interface has been terrific, and the
gimple trees have been great to work with!
Please, note that the plugin API is mainly driven by its users. If you want to
see improvements, don't hesitate to propose patches.