From: rguenth Date: Thu, 22 Oct 2009 12:17:12 +0000 (+0000) Subject: 2009-10-22 Richard Guenther X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=5575303a6f482c129ab56a29a79d9e88a6288d27 2009-10-22 Richard Guenther * lto-streamer.h (lto_symtab_clear_resolution): Remove. * lto-symtab.c (lto_symtab_clear_resolution): Likewise. lto/ * lto.c (lto_fixup_data_t): Remove free_list member. (lto_fixup_tree): Do not insert into free_list. (free_decl): Remove. (lto_fixup_decls): Remove free-list handling. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153452 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a709e5312d5..5d91f8713b6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,21 +1,27 @@ +2009-10-22 Richard Guenther + + * lto-streamer.h (lto_symtab_clear_resolution): Remove. + * lto-symtab.c (lto_symtab_clear_resolution): Likewise. + 2009-10-22 Jan Hubicka - PR tree-optimize/40556 - * ipa-reference.c (has_proper_scope_for_analysis): Add fixme about global vars. - (check_call): Handle only indirect calls. - (propagate_bits): Update comment. - (write_node_summary_p): Turn bogus check to assert. - (ipa_reference_write_summary): Stream calls_read_all properly. - (ipa_reference_read_summary): Stream in calls_read_all properly. - (read_write_all_from_decl): New function. - (propagate): Handle OVERWRITABLE nodes and external calls here. - * ipa-pre-const.c (check_call): In IPA mode handle indirect calls - only. - (analyze_function): Do not check visibility here. - (add_new_function): We summary OVERWRITABLE too. - (generate_summary): Stream OVERWRITABLE nodes too. - (propagate): Handle external calls and OVERWRITABLE nodes here. - (local_pure_const): Check visibility here. + PR tree-optimize/40556 + * ipa-reference.c (has_proper_scope_for_analysis): Add fixme about + global vars. + (check_call): Handle only indirect calls. + (propagate_bits): Update comment. + (write_node_summary_p): Turn bogus check to assert. + (ipa_reference_write_summary): Stream calls_read_all properly. + (ipa_reference_read_summary): Stream in calls_read_all properly. + (read_write_all_from_decl): New function. + (propagate): Handle OVERWRITABLE nodes and external calls here. + * ipa-pre-const.c (check_call): In IPA mode handle indirect calls + only. + (analyze_function): Do not check visibility here. + (add_new_function): We summary OVERWRITABLE too. + (generate_summary): Stream OVERWRITABLE nodes too. + (propagate): Handle external calls and OVERWRITABLE nodes here. + (local_pure_const): Check visibility here. 2009-10-22 Jan Hubicka diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h index 260d773f300..4b8b845dfe8 100644 --- a/gcc/lto-streamer.h +++ b/gcc/lto-streamer.h @@ -847,7 +847,6 @@ extern void lto_symtab_register_decl (tree, ld_plugin_symbol_resolution_t, extern void lto_symtab_merge_decls (void); extern tree lto_symtab_prevailing_decl (tree decl); extern enum ld_plugin_symbol_resolution lto_symtab_get_resolution (tree decl); -extern void lto_symtab_clear_resolution (tree decl); /* In lto-opts.c. */ diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c index 275875180c6..d292a571e87 100644 --- a/gcc/lto-symtab.c +++ b/gcc/lto-symtab.c @@ -641,53 +641,4 @@ lto_symtab_prevailing_decl (tree decl) return ret->decl; } -/* Remove any storage used to store resolution of DECL. */ - -void -lto_symtab_clear_resolution (tree decl) -{ - struct lto_symtab_entry_def temp; - lto_symtab_entry_t head; - void **slot; - - if (!TREE_PUBLIC (decl)) - return; - - /* LTO FIXME: There should be no DECL_ABSTRACT in the middle end. */ - if (TREE_CODE (decl) == FUNCTION_DECL && DECL_ABSTRACT (decl)) - return; - - gcc_assert (DECL_ASSEMBLER_NAME_SET_P (decl)); - - lto_symtab_maybe_init_hash_table (); - temp.id = DECL_ASSEMBLER_NAME (decl); - slot = htab_find_slot (lto_symtab_identifiers, &temp, NO_INSERT); - if (!*slot) - return; - - head = (lto_symtab_entry_t) *slot; - if (head->decl == decl) - { - if (head->next) - { - *slot = head->next; - head->next = NULL; - } - else - htab_remove_elt (lto_symtab_identifiers, &temp); - } - else - { - lto_symtab_entry_t e; - while (head->next && head->next->decl != decl) - head = head->next; - if (head->next) - { - e = head->next; - head->next = e->next; - e->next = NULL; - } - } -} - #include "gt-lto-symtab.h" diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index a53a8c04e79..dd0ff8ec195 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,10 @@ +2009-10-22 Richard Guenther + + * lto.c (lto_fixup_data_t): Remove free_list member. + (lto_fixup_tree): Do not insert into free_list. + (free_decl): Remove. + (lto_fixup_decls): Remove free-list handling. + 2009-10-22 Jan Hubicka * lto.c (lto_fixup_jump_functions): New function. diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index a8ad9e369b9..79af51f3478 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -1193,7 +1193,6 @@ lto_execute_ltrans (char *const *files) typedef struct { - struct pointer_set_t *free_list; struct pointer_set_t *seen; } lto_fixup_data_t; @@ -1528,8 +1527,6 @@ lto_fixup_tree (tree *tp, int *walk_subtrees, void *data) lto_mark_nothrow_fndecl (prevailing); } - pointer_set_insert (fixup_data->free_list, t); - /* Also replace t with prevailing defintion. We don't want to insert the other defintion in the seen set as we want to replace all instances of it. */ @@ -1638,20 +1635,6 @@ lto_fixup_state_aux (void **slot, void *aux) return 1; } -/* A callback to pointer_set_traverse. Frees the tree pointed by p. Removes - from it from the UID -> DECL mapping. */ - -static bool -free_decl (const void *p, void *data ATTRIBUTE_UNUSED) -{ - const_tree ct = (const_tree) p; - tree t = CONST_CAST_TREE (ct); - - lto_symtab_clear_resolution (t); - - return true; -} - /* Fixup pointers in jump functions. TODO: We need some generic solution that will allow tree pointers in function summaries. */ @@ -1707,11 +1690,9 @@ lto_fixup_decls (struct lto_file_decl_data **files) { unsigned int i; tree decl; - struct pointer_set_t *free_list = pointer_set_create (); struct pointer_set_t *seen = pointer_set_create (); lto_fixup_data_t data; - data.free_list = free_list; data.seen = seen; for (i = 0; files[i]; i++) { @@ -1732,8 +1713,6 @@ lto_fixup_decls (struct lto_file_decl_data **files) if (ipa_edge_args_vector) lto_fixup_jump_functions (&data); - pointer_set_traverse (free_list, free_decl, NULL); - pointer_set_destroy (free_list); pointer_set_destroy (seen); }