This is the mail archive of the
mailing list for the GCC project.
Re: ipa-icf::merge TLC
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Jack Howarth <howarth dot at dot gcc at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Martin LiÅka <mliska at suse dot cz>, Jakub Jelinek <jakub at redhat dot com>
- Date: Fri, 27 Feb 2015 05:35:02 -0800
- Subject: Re: ipa-icf::merge TLC
- Authentication-results: sourceware.org; auth=none
- References: <20150225083810 dot GA86854 at kam dot mff dot cuni dot cz> <CAJMcOU-9=VSQK3RgDqezLbkQq=0CkCWC6VSaR1UxQaFopp4=sA at mail dot gmail dot com> <20150227021047 dot GA20437 at kam dot mff dot cuni dot cz>
On Thu, Feb 26, 2015 at 6:10 PM, Jan Hubicka <email@example.com> wrote:
> 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.
> * 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):
> (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.