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
This commit is contained in:
parent
86a8a2e509
commit
f9c91f8a90
5 changed files with 29 additions and 87 deletions
|
@ -1,21 +1,27 @@
|
|||
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>
|
||||
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
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.
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue