[go] bulitins housekeeping; add __bultin_unreachable

Ian Lance Taylor iant@google.com
Tue Oct 16 16:43:00 GMT 2012


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



More information about the Gcc-patches mailing list