This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ipa-icf::merge TLC

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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]