This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gomp] implement a handfull of easy directives


Daniel Berlin <dberlin@dberlin.org> writes:

> > The builtins table is initialized with a separate .def file, but it
> > boils down to initializers this:
> > 
> >   { code, "__builtin_name", C2_INT,
> >    { C2_INT, C2_VPTR, C2_NONE, C2_NONE, C2_NONE, C2_NONE } },
> > 
> > This way I only have to write the type in one place, I only create the
> > function types I need, and the types are cached so I don't create the
> > same type more than once.
> > 
> > Much simpler in the long run, I think.
> 
> How are you handling putting attributes on these builtin functions?

I didn't bother to show it, but I also have a code for which type of
attribute they should take.  I build a table indexed by the code, and
pass the appropriate entry in to builtin_function.  That part of it is
basically the way that builtins.def works today.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]