From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7712 invoked by alias); 12 Dec 2015 19:00:19 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 7559 invoked by uid 89); 12 Dec 2015 19:00:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f41.google.com Received: from mail-oi0-f41.google.com (HELO mail-oi0-f41.google.com) (209.85.218.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 12 Dec 2015 19:00:03 +0000 Received: by oiai186 with SMTP id i186so4424805oia.2 for ; Sat, 12 Dec 2015 11:00:01 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.202.80.204 with SMTP id e195mr18639458oib.75.1449946801742; Sat, 12 Dec 2015 11:00:01 -0800 (PST) Received: by 10.76.77.99 with HTTP; Sat, 12 Dec 2015 11:00:01 -0800 (PST) In-Reply-To: <20151208223003.GE58058@kam.mff.cuni.cz> References: <20151208223003.GE58058@kam.mff.cuni.cz> Date: Sat, 12 Dec 2015 19:00:00 -0000 Message-ID: Subject: Re: Transparent alias suport part 7 (lto-symtab support) From: "H.J. Lu" To: Jan Hubicka Cc: GCC Patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-12/txt/msg01335.txt.bz2 On Tue, Dec 8, 2015 at 2:30 PM, Jan Hubicka 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.