diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-11 05:51:23 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-11 05:51:23 +0000 |
commit | e4c07a066a592ab5eeaf9490187013769337baae (patch) | |
tree | 1eaa587ddb6f0f91bbd446438e1bb46f9b1df815 /gcc/lto | |
parent | b37eccc71775be636c10be115a01da2b3e14b6a7 (diff) | |
download | gcc-e4c07a066a592ab5eeaf9490187013769337baae.tar.gz |
* varasm.c (set_implicit_section): New function.
(resolve_unique_section): Use it to set implicit section
for aliases, too.
(get_named_text_section): Use symtab_get_node (decl)->implicit_section
(default_function_section): Likewise.
(decl_binds_to_current_def_p): Constify argument.
* varasm.h (decl_binds_to_current_def_p): Update prototype.
* asan.c (asan_protect_global): Use symtab_get_node (decl)->implicit_section.
* symtab.c (dump_symtab_base): Dump implicit sections.
(verify_symtab_base): Verify sanity of sectoins and comdats.
(symtab_resolve_alias): Alias share the section of its target.
(set_section_1): New function.
(symtab_node::set_section): Move here, recurse to aliases.
(verify_symtab): Check for duplicated symtab lists.
* tree-core.h (implicit_section_name_p): Remove.
* tree-vect-data-refs.c: Include varasm.h.
(vect_can_force_dr_alignment_p): Fix conditional on when
decl bints to current definition; use
symtab_get_node (decl)->implicit_section.
* cgraph.c (cgraph_make_node_local_1): Fix section set.
* cgraph.h (struct symtab_node): Add implicit_section.
(set_section): Rename to ...
(set_section_for_node): ... this one.
(set_section): Declare.
* tree.h (DECL_HAS_IMPLICIT_SECTION_NAME_P): Remove.
* lto-cgraph.c (lto_output_node, lto_output_varpool_node,
input_overwrite_node, input_varpool_node): Stream implicit_section.
* ipa.c (symtab_remove_unreachable_nodes): Do not check symtab before
removal; it will fail in LTO.
* vtable-class-hierarchy.c: Use symtab_get_node (var_decl)->implicit_section.
* optimize.c (cdtor_comdat_group): Fix handling of aliases.
(maybe_clone_body): Move symbol across comdat groups.
* method.c (use_thunk): Copy implicit section flag.
* go/go-gcc.cc (Gcc_backend::global_variable_set_init): Use
symtab_get_node(var_decl)->implicit_section.
* lto.c (read_cgraph_and_symbols): Remove unreachable symbols.
(do_whole_program_analysis): Use verify_symtab.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@211434 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lto/lto.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 3edd6bab91f..ae48cdc0571 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,8 @@ +2014-06-10 Jan Hubicka <hubicka@ucw.cz> + + * lto.c (read_cgraph_and_symbols): Remove unreachable symbols. + (do_whole_program_analysis): Use verify_symtab. + 2014-06-07 Jan Hubicka <hubicka@ucw.cz> * lto.c (mentions_vars_p_decl_with_vis, compare_tree_sccs_1, diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 9db7845889e..c6c6c825180 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -3090,6 +3090,10 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) dump_symtab (cgraph_dump_file); } lto_symtab_merge_symbols (); + /* Removal of unreacable symbols is needed to make verify_symtab to pass; + we are still having duplicated comdat groups containing local statics. + We could also just remove them while merging. */ + symtab_remove_unreachable_nodes (false, dump_file); ggc_collect (); cgraph_state = CGRAPH_STATE_IPA_SSA; @@ -3261,7 +3265,7 @@ do_whole_program_analysis (void) dump_symtab (cgraph_dump_file); } #ifdef ENABLE_CHECKING - verify_cgraph (); + verify_symtab (); #endif bitmap_obstack_release (NULL); |