From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9238 invoked by alias); 27 Feb 2015 13:35:07 -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 9228 invoked by uid 89); 27 Feb 2015 13:35:06 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ob0-f176.google.com Received: from mail-ob0-f176.google.com (HELO mail-ob0-f176.google.com) (209.85.214.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 27 Feb 2015 13:35:05 +0000 Received: by mail-ob0-f176.google.com with SMTP id wo20so18256737obc.7 for ; Fri, 27 Feb 2015 05:35:03 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.202.191.194 with SMTP id p185mr9572961oif.128.1425044103859; Fri, 27 Feb 2015 05:35:03 -0800 (PST) Received: by 10.76.134.102 with HTTP; Fri, 27 Feb 2015 05:35:02 -0800 (PST) In-Reply-To: <20150227021047.GA20437@kam.mff.cuni.cz> References: <20150225083810.GA86854@kam.mff.cuni.cz> <20150227021047.GA20437@kam.mff.cuni.cz> Date: Fri, 27 Feb 2015 13:48:00 -0000 Message-ID: Subject: Re: ipa-icf::merge TLC From: "H.J. Lu" To: Jan Hubicka Cc: Jack Howarth , GCC Patches , =?UTF-8?Q?Martin_Li=C5=A1ka?= , Jakub Jelinek Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-02/txt/msg01700.txt.bz2 On Thu, Feb 26, 2015 at 6:10 PM, Jan Hubicka wrote: > Hi, > this is the final version of patch I comitted. It has new fix to make_decl_local > to set TREE_ADDRESSABLE becuase we leave the flag undefined for non-local decls. > I also dropped Optimization from fmerge-all-constants, fmerge-constants > those can not be done in function speicfic way, I made ipa_ref::address_matters_p > to use fmerge-constants, added code to drop UNINLINABLE flag when function is turned > into a wrapper, added check to require DECL_NO_INLINE_WARNING_P match > and added code to set TREE_ADDRESSABLE when non-addressable and addressable vars are merged. > I also disabled merging for DECL_CONSTANT_POOL because it does not work (symtab does not > expect aliases here) > > Bootstrapped/regtested x86_64-linux, comitted. > > Honza > * ipa-icf.c (symbol_compare_collection::symbol_compare_colleciton): > Use address_matters_p. > (redirect_all_callers, set_addressable): New functions. > (sem_function::merge): Reorganize and fix merging issues. > (sem_variable::merge): Likewise. > (sem_variable::compare_sections): Remove. > * common.opt (fmerge-all-constants, fmerge-constants): Remove > Optimization flag. > * symtab.c (symtab_node::resolve_alias): When alias has aliases, > redirect them. > (symtab_node::make_decl_local): Set ADDRESSABLE bit when > decl is used. > (address_matters_1): New function. > (symtab_node::address_matters_p): New function. > * cgraph.c (cgraph_edge::verify_corresponds_to_fndecl): Fix > check for merged flag. > * cgraph.h (address_matters_p): Declare. > (symtab_node::address_taken_from_non_vtable_p): Remove. > (symtab_node::address_can_be_compared_p): New method. > (ipa_ref::address_matters_p): Move here from ipa-ref.c; simplify. > * ipa-visibility.c (symtab_node::address_taken_from_non_vtable_p): > Remove. > (comdat_can_be_unshared_p_1) Use address_matters_p. > (update_vtable_references): Fix formating. > * ipa-ref.c (ipa_ref::address_matters_p): Move inline. > * cgraphunit.c (cgraph_node::create_wrapper): Drop UNINLINABLE flag. > * cgraphclones.c: Preserve merged and icf_merged flags. > This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65237 -- H.J.