Ravi updated to build against libgccjit 5.2.0
David Malcolm
dmalcolm@redhat.com
Thu Jan 1 00:00:00 GMT 2015
On Sat, 2015-07-25 at 11:27 +0100, Dibyendu Majumdar wrote:
> Hi,
>
> Since updating to libgccjit 5.2, Ravi's JIT compiler is working
> without any patches. Performance is on par with the LLVM
> implementation.
Excellent. Thanks for the heads-up.
I've taken the liberty of adding a link to Ravi to the wiki page:
https://gcc.gnu.org/wiki/JIT
in the "Who's using this code?" section.
> Presumably if I wanted to create a binary release including libgccjit
> then I need to simply include the libgccjit shared library?
Ideally packages would eventually be available from OS vendors, but you
need 5.2 which is quite recent.
If you want to go down the bundling route, libgccjit.so by itself isn't
going to be enough: the shared library currently has a run-time
dependency on a driver binary that's built at the same time (see
https://gcc.gnu.org/onlinedocs/jit/internals/index.html#envvar-PATH )
and maybe on a specific version of libgcc. You may be able to get away
with just the driver binary.
So you may want to configure with an installation prefix
(--prefix=/somewhere-for-ravi-to-own) and "make install" to it when
building your release.
Alternatively, a nasty hack would be to hack up GCC_DRIVER_NAME in
jit/jit-playback.c to simply use the system "gcc" on the PATH, though
this assumes that that gcc is sufficiently compatible with the gcc 5
code in the libgccjit.so you built (e.g. the underlying toolchain can
cope with every opcode that it could generate).
Sorry that this is messy. I'm hoping to embed the relevant code from
the driver in-process into libgccjit.so for gcc 6 (it's part of the
optimization patches I linked to in another post), which should simplify
this considerably.
Dave
More information about the Jit
mailing list