On Thu, Apr 21, 2011 at 05:36:42PM +0200, Richard Guenther wrote:
> On Thu, Apr 21, 2011 at 5:04 PM, Nathan Froyd <froy...@codesourcery.com> 
> wrote:
> > This patch does two things:
> >
> > - centralizes some infrastructure for defining builtin function types
> >  for frontends by providing a common function that
> >  DEF_FUNCTION_TYPE_FOO macros can call; and
> >
> > - in order to do that well, it also introduces
> >  build{,_varargs}_function_type_array for cases when
> >  build_function_type_list's interface doesn't work so well.
> >
> > build_function_type_list could have been used instead, but it would lose
> > the error_mark_node handling provided in the C/C++/Ada/LTO frontends.
> > This new interface will be necessary for eliminating other uses of
> > build_function_type anyway.
> >
> > It would have been easier to move all of the builtin-types stuff into
> > the middle-end, but Fortran doesn't use builtin-types.def.  Even if it
> > did, I suppose it's possible that some new front-end could have its own
> > set of builtin types, so I'm leaving things as they are.
> 
> But this is what should be done, at least for all builtins in the
> BUILT_IN_NORMAL category.  ISTR Fortran was once running into
> the issue of assigning different DECL_FUNCTION_CODE numbers to
> those builtins than other languages, breaking LTO.
> 
> So, it would be indeed nice to have a central middle-end place to
> instantiate those builtins and their required types.  I'm not sure how
> far we are from that and am too lazy to look right now ...

I agree that it is desirable that the backend builtin index not overlap with
the standard builtin index (and front end builtin index).  I was starting to
look at this, when I learned Kenneth Zadeck was working on a more comprehensive
solution for backend builtin types.  Obviously all 3 of our efforts should be
merged into one goal.

-- 
Michael Meissner, IBM
5 Technology Place Drive, M/S 2757, Westford, MA 01886-3141, USA
meiss...@linux.vnet.ibm.com     fax +1 (978) 399-6899

Reply via email to