This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Transparent alias suport part 7 (lto-symtab support)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 12 Dec 2015 11:00:01 -0800
- Subject: Re: Transparent alias suport part 7 (lto-symtab support)
- Authentication-results: sourceware.org; auth=none
- References: <20151208223003 dot GE58058 at kam dot mff dot cuni dot cz>
On Tue, Dec 8, 2015 at 2:30 PM, Jan Hubicka <hubicka@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.