cross-compilation & libgccjit
David Malcolm
dmalcolm@redhat.com
Thu Jan 1 00:00:00 GMT 2015
On Thu, 2015-07-16 at 11:10 +0200, Basile Starynkevitch wrote:
> On 07/15/2015 17:03, David Malcolm wrote that he is working on:
> > (a) libgccjit: adding support for cross-compilation (perhaps with a
> > gcc_jit_target type).
>
> If you do that, you really should change the name of your library. By
> definition Just-In-Time compilation is
> with the host same as the target and forbids the idea of
> cross-compilation (which is always Ahead Of Time).
I don't agree. In my mind "Just-In-Time compilation" means doing the
compilation when you're about to execute the result, rather than a long
time in advance.
Consider a 3D videogame, running on an x86_64 computer, which compiles
OpenGL shader programs for a GPU. You could have e.g.
host == x86_64-linux
target == some radeon GPU, say
which is clearly cross-compilation, but the GPU code in question is
generated immediately before it is to be executed for the exact GPU
attached to the motherboard, and uploaded to it from main memory, rather
than being built ahead of time and packaged up as GPU binary with the
game CPU binary.
You might more reasonably complain about the ahead-of-time compilation
support provided by gcc_jit_context_compile_to_file, but that's
acknowledged in the docs as being not the primary scope of the library:
https://gcc.gnu.org/onlinedocs/jit/topics/compilation.html#ahead-of-time-compilation
> Perhaps your library should be renamed as libgccgeneratecode and sit in
> gcc/generate/
>
> That name is not sexy, but I really believe that cross-compilation
> cannot be Just In Time by definition; so please don't call your library
> libgccjit (or anything containing JIT acronym) if it is not related to
> Just In Time compilation, see
> https://en.wikipedia.org/wiki/Just-in-time_compilation
>
>
> Please, please, don't name gccjit something which is not only for Just
> In Time. Find another name!
>
> Cheers
>
More information about the Jit
mailing list