On Tue, Dec 8, 2015 at 2:30 PM, Jan Hubicka <hubi...@ucw.cz> wrote: > Hi, > this patch adds support to lto-symtab.c to prevent merging of certain > declarations. The new predicate lto_symtab_merge_p can be used to decide > about this. The change is pretty straigforward. lto_symtab_merge_decls_2 > makes the decisions about what decls to merge and lto_symtab_merge_symbols_1 > does the corresponding symbol merging/creation of transparent aliases. > > I re-implemented lto_symtab_prevailing_decl and moved it to inline so the > merging pass is also considerably faster (it used to do quite expensive > assembler name hash lookup on every occurenceof the decl). Merging decisions > are represented by setting DECL_ABSTRACT_ORIGIN to error_mark_node and > DECL_CHAIN to the replacement decl. This is quite arbitrary decision - I > needed > a pointer and flag that is not going to mess with the warnings we output > during the lto-symtab's operation. > > The patch does not disable any of the wrong merging we are hitting. I will > dot hat separately and with a testcases. I only revisited a bit the way > builtins are handled. > > Bootstrapped/regtested x86_64-linux. I am re-running the lto-bootstrap after > some last minute changes and plan commit once it converges. > > Honza > > PR ipa/61886 > * lto-streamer.h (lto_symtab_merge_decls, lto_symtab_merge_symbols, > lto_symtab_prevailing_decl): MOve to lto-symtab.h. > > * lto-symtab.c: Include lto-symtab.h. > (lto_cgraph_replace_node): Do not merge profiles here. > (lto_symtab_merge_p): New function. > (lto_symtab_merge_decls_2): Honor lto_symtab_merge_p. > (lto_symtab_merge_symbols_1): Turn unmerged decls into transparent > aliases. > (lto_symtab_merge_symbols): Do not clear node->aux; we no longer use > it. > (lto_symtab_prevailing_decl): Move to lto-symtab.h; rewrite. > * lto.c: Include lto-symtab.h > * lto-symtab.h: New. >
This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68878 -- H.J.