This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 14/27] New files: gcc/jit/jit-builtins.{c|h}
- From: David Malcolm <dmalcolm at redhat dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, jit at gcc dot gnu dot org
- Date: Tue, 04 Nov 2014 11:35:02 -0500
- Subject: Re: [PATCH 14/27] New files: gcc/jit/jit-builtins.{c|h}
- Authentication-results: sourceware.org; auth=none
- References: <1414774977-25605-1-git-send-email-dmalcolm at redhat dot com> <1414774977-25605-15-git-send-email-dmalcolm at redhat dot com> <5457EDCB dot 2030302 at redhat dot com>
On Mon, 2014-11-03 at 14:04 -0700, Jeff Law wrote:
> On 10/31/14 11:02, David Malcolm wrote:
> > These files implement support for builtins, for the
> > gcc_jit_context_get_builtin_function
> > API entrypoint.
> >
> > Only a subset of builtins are currently supported, based on those
> > that I needed when porting GNU Octave's JIT.
> >
> > Attempts to use other builtins may lead to an error:
> > "unimplemented primitive type for builtin"
> > being emitted on the gcc_jit_context.
> >
> > gcc/jit/
> > * jit-builtins.c: New.
> > * jit-builtins.h: New.
> So how do you envision maintenance on this in the future? Reality is
> folks are regularly adding new builtins, are they going to have to
> update the JIT too?
I believe the jit will only need updating if someone adds a new *macro*
to builtin-types.def e.g. if someone adds a new
DEF_FUNCTION_TYPE_9
or somesuch.
Everything is keyed off the .def files, so GCC developers adding a new
builtin shouldn't need to touch the jit.
As I noted above, only a subset of the types are currently supported
from the jit; attempts to use builtins of other types from the jit will
fail at runtime with the type error I pasted above (and can be fixed up
on a case-by-case basis if the users file bug reports).
> OK for the trunk.
Thanks
Dave