Commit f9c91f8a by Richard Biener

lto-streamer.h (lto_symtab_clear_resolution): Remove.

2009-10-22  Richard Guenther  <rguenther@suse.de>

	* 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.

From-SVN: r153452
parent 86a8a2e5
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> 2009-10-22 Jan Hubicka <jh@suse.cz>
PR tree-optimize/40556 PR tree-optimize/40556
* ipa-reference.c (has_proper_scope_for_analysis): Add fixme about global vars. * ipa-reference.c (has_proper_scope_for_analysis): Add fixme about
(check_call): Handle only indirect calls. global vars.
(propagate_bits): Update comment. (check_call): Handle only indirect calls.
(write_node_summary_p): Turn bogus check to assert. (propagate_bits): Update comment.
(ipa_reference_write_summary): Stream calls_read_all properly. (write_node_summary_p): Turn bogus check to assert.
(ipa_reference_read_summary): Stream in calls_read_all properly. (ipa_reference_write_summary): Stream calls_read_all properly.
(read_write_all_from_decl): New function. (ipa_reference_read_summary): Stream in calls_read_all properly.
(propagate): Handle OVERWRITABLE nodes and external calls here. (read_write_all_from_decl): New function.
* ipa-pre-const.c (check_call): In IPA mode handle indirect calls (propagate): Handle OVERWRITABLE nodes and external calls here.
only. * ipa-pre-const.c (check_call): In IPA mode handle indirect calls
(analyze_function): Do not check visibility here. only.
(add_new_function): We summary OVERWRITABLE too. (analyze_function): Do not check visibility here.
(generate_summary): Stream OVERWRITABLE nodes too. (add_new_function): We summary OVERWRITABLE too.
(propagate): Handle external calls and OVERWRITABLE nodes here. (generate_summary): Stream OVERWRITABLE nodes too.
(local_pure_const): Check visibility here. (propagate): Handle external calls and OVERWRITABLE nodes here.
(local_pure_const): Check visibility here.
2009-10-22 Jan Hubicka <jh@suse.cz> 2009-10-22 Jan Hubicka <jh@suse.cz>
...@@ -847,7 +847,6 @@ extern void lto_symtab_register_decl (tree, ld_plugin_symbol_resolution_t, ...@@ -847,7 +847,6 @@ extern void lto_symtab_register_decl (tree, ld_plugin_symbol_resolution_t,
extern void lto_symtab_merge_decls (void); extern void lto_symtab_merge_decls (void);
extern tree lto_symtab_prevailing_decl (tree decl); extern tree lto_symtab_prevailing_decl (tree decl);
extern enum ld_plugin_symbol_resolution lto_symtab_get_resolution (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. */ /* In lto-opts.c. */
......
...@@ -641,53 +641,4 @@ lto_symtab_prevailing_decl (tree decl) ...@@ -641,53 +641,4 @@ lto_symtab_prevailing_decl (tree decl)
return ret->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" #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> 2009-10-22 Jan Hubicka <jh@suse.cz>
* lto.c (lto_fixup_jump_functions): New function. * lto.c (lto_fixup_jump_functions): New function.
......
...@@ -1193,7 +1193,6 @@ lto_execute_ltrans (char *const *files) ...@@ -1193,7 +1193,6 @@ lto_execute_ltrans (char *const *files)
typedef struct { typedef struct {
struct pointer_set_t *free_list;
struct pointer_set_t *seen; struct pointer_set_t *seen;
} lto_fixup_data_t; } lto_fixup_data_t;
...@@ -1528,8 +1527,6 @@ lto_fixup_tree (tree *tp, int *walk_subtrees, void *data) ...@@ -1528,8 +1527,6 @@ lto_fixup_tree (tree *tp, int *walk_subtrees, void *data)
lto_mark_nothrow_fndecl (prevailing); lto_mark_nothrow_fndecl (prevailing);
} }
pointer_set_insert (fixup_data->free_list, t);
/* Also replace t with prevailing defintion. We don't want to /* Also replace t with prevailing defintion. We don't want to
insert the other defintion in the seen set as we want to insert the other defintion in the seen set as we want to
replace all instances of it. */ replace all instances of it. */
...@@ -1638,20 +1635,6 @@ lto_fixup_state_aux (void **slot, void *aux) ...@@ -1638,20 +1635,6 @@ lto_fixup_state_aux (void **slot, void *aux)
return 1; 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. /* Fixup pointers in jump functions.
TODO: We need some generic solution that will allow tree pointers in TODO: We need some generic solution that will allow tree pointers in
function summaries. */ function summaries. */
...@@ -1707,11 +1690,9 @@ lto_fixup_decls (struct lto_file_decl_data **files) ...@@ -1707,11 +1690,9 @@ lto_fixup_decls (struct lto_file_decl_data **files)
{ {
unsigned int i; unsigned int i;
tree decl; tree decl;
struct pointer_set_t *free_list = pointer_set_create ();
struct pointer_set_t *seen = pointer_set_create (); struct pointer_set_t *seen = pointer_set_create ();
lto_fixup_data_t data; lto_fixup_data_t data;
data.free_list = free_list;
data.seen = seen; data.seen = seen;
for (i = 0; files[i]; i++) for (i = 0; files[i]; i++)
{ {
...@@ -1732,8 +1713,6 @@ lto_fixup_decls (struct lto_file_decl_data **files) ...@@ -1732,8 +1713,6 @@ lto_fixup_decls (struct lto_file_decl_data **files)
if (ipa_edge_args_vector) if (ipa_edge_args_vector)
lto_fixup_jump_functions (&data); lto_fixup_jump_functions (&data);
pointer_set_traverse (free_list, free_decl, NULL);
pointer_set_destroy (free_list);
pointer_set_destroy (seen); pointer_set_destroy (seen);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment