+2009-10-22 Richard Guenther <rguenther@suse.de>
+
+ * lto-streamer.h (lto_symtab_clear_resolution): Remove.
+ * lto-symtab.c (lto_symtab_clear_resolution): Likewise.
+
2009-10-22 Jan Hubicka <jh@suse.cz>
- 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 <jh@suse.cz>
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. */
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"
+2009-10-22 Richard Guenther <rguenther@suse.de>
+
+ * 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 <jh@suse.cz>
* lto.c (lto_fixup_jump_functions): New function.
typedef struct {
- struct pointer_set_t *free_list;
struct pointer_set_t *seen;
} lto_fixup_data_t;
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. */
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. */
{
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++)
{
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);
}