aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2012-04-18 11:57:53 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2012-04-18 09:57:53 +0000
commit5932a4d411f30d1a07789f28528a2c57fb8e33e4 (patch)
tree557443c354065839ba2b0035e3d525377e5293fa /gcc/lto
parentf31486202790ebadffdb6f445a71f383ea5a1438 (diff)
downloadgcc-5932a4d411f30d1a07789f28528a2c57fb8e33e4.zip
gcc-5932a4d411f30d1a07789f28528a2c57fb8e33e4.tar.gz
gcc-5932a4d411f30d1a07789f28528a2c57fb8e33e4.tar.bz2
lto-symtab.c (lto_cgraph_replace_node): Update.
* lto-symtab.c (lto_cgraph_replace_node): Update. * cgraphbuild.c (record_reference, record_type_list, record_eh_tables, mark_address, mark_load, mark_store): Update. * cgraph.c (cgraph_same_body_alias, dump_cgraph_node, cgraph_create_virtual_clone, cgraph_for_node_thunks_and_aliases): Update. * cgraph.h (symtab_node_def, symtab_node, const_symtab_node): Remove. (cgraph_alias_aliased_node, varpool_alias_aliased_node): Update. * reload.c: Fix typo in comment. * rtlanal.c: Likewise. * tree-emultls.c (gen_emutls_addr): Update. * ipa-reference.c (analyze_function): Update. * cgraphunit.c (cgraph_analyze_function, cgraph_process_same_body_aliases, assemble_thunks_and_aliases): Update. * ipa-ref.c (ipa_record_reference): Reorg to avoid reference types. (ipa_remove_reference): Likewise. (ipa_remove_all_refering): Rename to ... (ipa_remove_all_referring): ... this one; update. (ipa_dump_references): Update. (ipa_dump_referring): Update. (ipa_clone_references): Update. (ipa_clone_refering): Rename to ... (ipa_clone_referring): ... this one; update. (ipa_ref_cannot_lead_to_return): Update. (ipa_ref_has_aliases_p): Update. * ipa-ref.h (symtab_node_def, symtab_node, const_symtab_node): New forward typedefs. (ipa_ref_type): Remove. (ipa_ref_ptr_u): Remove. (ipa_ref): Remove referencing, refered, refered_index, refering_type and refered_type; add referring, referred and referred_index. (ipa_ref_list): Rename refering to referring. (ipa_record_reference, ipa_remove_all_referring, ipa_dump_referring, ipa_clone_references, ipa_clone_referring): Update prototypes. * lto-cgraph.c (referenced_from_other_partition_p): Update. (lto_output_ref): Update. (add_references): Update. (input_varpool_node): Update. (input_refs): Update. * ipa-ref-inline.h (ipa_ref_node): Update. (ipa_ref_varpool_node): Update. (ipa_ref_referring_node); Update. (ipa_ref_referring_varpool_node): Update. (ipa_ref_referring_ref_list); Update. (ipa_ref_referred_ref_list): Update. (ipa_ref_list_first_referring): Update. (ipa_empty_ref_list): Update. (ipa_ref_list_refering_iterate): Rename to ... (ipa_ref_list_referring_iterate): ... this one. * cse.c: Update comment. * ipa-utils.c (ipa_reverse_postorder): Update. * tree-ssa-alias.c: Update. * ipa-inline.c (reset_edge_caches): Update. (update_caller_keys): Update. * ipa-inline.h: Update comments. * jump.c: Update comment. * alias.c: Likewise. * ipa.c (process_references): Update. (cgraph_remove_unreachable_nodes): Likewise. (ipa_discover_readonly_nonaddressable_var): Likewise. (cgraph_address_taken_from_non_vtable_p): Likewise. * trans-mem.c (ipa_tm_execute): Update. * simplify-rtx.c: Fix comment. * rtl.c: Fix comment. * symtab.c (symtab_unregister_node): Update. * varpool.c (dump_varpool_node): Update. (varpool_analyze_pending_decls): Update. (assemble_aliases): Update. (varpool_for_node_and_aliases): Update. From-SVN: r186564
Diffstat (limited to 'gcc/lto')
-rw-r--r--gcc/lto/ChangeLog5
-rw-r--r--gcc/lto/lto-partition.c34
2 files changed, 22 insertions, 17 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index bab0a77..96a8c97 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,8 @@
+2012-04-18 Jan Hubicka <jh@suse.cz>
+
+ * lto-partition.c (add_references_to_partition, lto_balanced_map):
+ Update for new ipa-ref API.
+
2012-04-16 Jan Hubicka <jh@suse.cz>
* lto.c (read_cgraph_and_symbols): Use FOR_EACH
diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c
index 1e60462..6fe672f 100644
--- a/gcc/lto/lto-partition.c
+++ b/gcc/lto/lto-partition.c
@@ -72,7 +72,7 @@ add_references_to_partition (ltrans_partition part, struct ipa_ref_list *refs)
struct ipa_ref *ref;
for (i = 0; ipa_ref_list_reference_iterate (refs, i, ref); i++)
{
- if (ref->refered_type == IPA_REF_CGRAPH
+ if (symtab_function_p (ref->referred)
&& (DECL_COMDAT (cgraph_function_node (ipa_ref_node (ref),
NULL)->symbol.decl)
|| (ref->use == IPA_REF_ALIAS
@@ -81,7 +81,7 @@ add_references_to_partition (ltrans_partition part, struct ipa_ref_list *refs)
&& !cgraph_node_in_set_p (ipa_ref_node (ref), part->cgraph_set))
add_cgraph_node_to_partition (part, ipa_ref_node (ref));
else
- if (ref->refered_type == IPA_REF_VARPOOL
+ if (symtab_variable_p (ref->referred)
&& (DECL_COMDAT (ipa_ref_varpool_node (ref)->symbol.decl)
|| (ref->use == IPA_REF_ALIAS
&& lookup_attribute
@@ -91,26 +91,26 @@ add_references_to_partition (ltrans_partition part, struct ipa_ref_list *refs)
part->varpool_set))
add_varpool_node_to_partition (part, ipa_ref_varpool_node (ref));
}
- for (i = 0; ipa_ref_list_refering_iterate (refs, i, ref); i++)
+ for (i = 0; ipa_ref_list_referring_iterate (refs, i, ref); i++)
{
- if (ref->refering_type == IPA_REF_CGRAPH
+ if (symtab_function_p (ref->referring)
&& ref->use == IPA_REF_ALIAS
- && !cgraph_node_in_set_p (ipa_ref_refering_node (ref),
+ && !cgraph_node_in_set_p (ipa_ref_referring_node (ref),
part->cgraph_set)
&& !lookup_attribute ("weakref",
DECL_ATTRIBUTES
- (ipa_ref_refering_node (ref)->symbol.decl)))
- add_cgraph_node_to_partition (part, ipa_ref_refering_node (ref));
+ (ipa_ref_referring_node (ref)->symbol.decl)))
+ add_cgraph_node_to_partition (part, ipa_ref_referring_node (ref));
else
- if (ref->refering_type == IPA_REF_VARPOOL
+ if (symtab_variable_p (ref->referring)
&& ref->use == IPA_REF_ALIAS
- && !varpool_node_in_set_p (ipa_ref_refering_varpool_node (ref),
+ && !varpool_node_in_set_p (ipa_ref_referring_varpool_node (ref),
part->varpool_set)
&& !lookup_attribute ("weakref",
DECL_ATTRIBUTES
- (ipa_ref_refering_varpool_node (ref)->symbol.decl)))
+ (ipa_ref_referring_varpool_node (ref)->symbol.decl)))
add_varpool_node_to_partition (part,
- ipa_ref_refering_varpool_node (ref));
+ ipa_ref_referring_varpool_node (ref));
}
}
@@ -612,7 +612,7 @@ lto_balanced_map (void)
/* Compute boundary cost of IPA REF edges and at the same time look into
variables referenced from current partition and try to add them. */
for (j = 0; ipa_ref_list_reference_iterate (refs, j, ref); j++)
- if (ref->refered_type == IPA_REF_VARPOOL)
+ if (symtab_variable_p (ref->referred))
{
varpool_node_set_iterator vsi;
@@ -643,12 +643,12 @@ lto_balanced_map (void)
else
cost++;
}
- for (j = 0; ipa_ref_list_refering_iterate (refs, j, ref); j++)
- if (ref->refering_type == IPA_REF_VARPOOL)
+ for (j = 0; ipa_ref_list_referring_iterate (refs, j, ref); j++)
+ if (symtab_variable_p (ref->referring))
{
varpool_node_set_iterator vsi;
- vnode = ipa_ref_refering_varpool_node (ref);
+ vnode = ipa_ref_referring_varpool_node (ref);
gcc_assert (vnode->finalized);
if (!vnode->symbol.aux && flag_toplevel_reorder
&& partition_varpool_node_p (vnode))
@@ -664,7 +664,7 @@ lto_balanced_map (void)
{
cgraph_node_set_iterator csi;
- node = ipa_ref_refering_node (ref);
+ node = ipa_ref_referring_node (ref);
gcc_assert (node->analyzed);
csi = cgraph_node_set_find (partition->cgraph_set, node);
if (!csi_end_p (csi)
@@ -876,7 +876,7 @@ lto_promote_cross_file_statics (void)
ipa_ref_list_reference_iterate (&vnode->symbol.ref_list, i, ref);
i++)
{
- if (ref->refered_type == IPA_REF_CGRAPH)
+ if (symtab_function_p (ref->referred))
{
struct cgraph_node *n = ipa_ref_node (ref);
gcc_assert (!n->global.inlined_to);