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