This is the mail archive of the gcc-patches@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: [go] bulitins housekeeping; add __bultin_unreachable


On Tue, Oct 16, 2012 at 8:14 AM, Jan Hubicka <hubicka@ucw.cz> wrote:

> this patch udpates go-frontend to deifine unreachable bultin I need for loop
> and LTO optimizations.  I also noticed that GO ignores existence of all flags
> except for CONST and thus I synchronized the flags with C FE variants.

I can't see how it makes sense to have to change the frontends in
order to be able to generate calls to a builtin function in the
middle-end.  Builtin functions used by the middle-end should be
defined by the middle-end, without any effort required on the part of
the frontend.  The frontend should only need to define functions that
might appear in the language that the frontend is compiling.

In other words, why not just have the middle-end call
add_builtin_function as required?  I see that some builtin functions
are already added by the middle-end in build_common_builtin_nodes.

Ian


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