> On Tue, Oct 16, 2012 at 8:14 AM, Jan Hubicka <hubi...@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.
Hmm, I was not aware of these bits (and yes, I agree it is non-sence this being duplicated everywhere). I will add UNREACHABLE there. What about rest of the change (i.e. adding the proper bits)? honza > > Ian