What I have in mind is to abstract out the initialization of TM builtins from
gtm-builtins.def (through its inclusion in builtins.def) into a separate
function that we can call either in c_define_builtins() from the C-ish
front-ends, or from lto_define_builtins (once we encounter a TM builtin and
enable flag_tm appropriately).
Hm? They are included in builtins.def, that looks appropriate for
middle-end builtins. Thus they should be initialized by lto1, too.
Are they not?
Since flag_tm is NULL, when lto_define_builtins runs, the TM builtins do
not get initialized. This is because DEF_TM_BUILTIN is predicated on
flag_tm.
It isn't until streamer_get_builtin_tree() that we realize the object
file has a TM builtin.