diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-14 10:24:59 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-14 10:24:59 +0000 |
commit | 7d0d0ce1c6bb14bfda0b0fc0fcd8e96bd8c173f0 (patch) | |
tree | 7b0127a94d4c70c75f4d133c7806c59bc61566c2 /gcc/ipa-reference.c | |
parent | 6348046755565ad1a4c61bb07f6725f9436a5685 (diff) | |
download | gcc-7d0d0ce1c6bb14bfda0b0fc0fcd8e96bd8c173f0.tar.gz |
* cgraph.h: Update copyrights;
(symtab_node): Turn to union typedef.
(symtab_node_base): New structure.
(symtab_type): Add SYMTAB_SYMBOL tag.
* cgraph.c: Update references to fields
(cgraph_hash, assembler_name_hash): Turn into symtab_node.
(cgraph_local_info): Remove lto_file_data
and externally_visible.
(cgraph_node): Remove decl; same_comdat_group list;
aux; ref_list; order; address_taken; reachable_from_other_parittion,
in_other_partition; resolution.
(varpool_node): Remove decl; same_comdat_group;
ref_list; lto_file_data; aux; order; resolution; externally_visible;
used_from_other_partition; in_other_partition.
(symtab_node_def); New union.
(cgraph, varpool): Update.
(varpool_first_static_initializer, varpool_next_static_initializer,
cgraph_only_called_directly_or_aliased_p,
varpool_can_remove_if_no_refs, varpool_can_remove_if_no_refs,
varpool_all_refs_explicit_p, cgraph_alias_aliased_node,
varpool_alias_aliased_node, cgraph_edge_recursive_p): Update
field references.
* cgraph.c: Likewise.
* cgraphbuild.c: Likewise.
* lto-symtab.c: Likewise.
* c-gimplify.c: Likewise.
* value-prof.c: Likewise.
* tree.c: Likewise.
* ipa-cp.c: Likewise.
* tree-emutls.c: Likewise.
* ipa-inline-transform.c: Likwise.
* ipa-reference.c: Likewise.
* cgraphunit.c: Likewise.
* ipa-ref.c: Likewise.
* lto-cgraph.c: Likewise.
* ipa-ref-inline.h: Likewise.
* ipa-pure-const.c: Likewise.
* lto-streamer-out.c: Likewise.
* ipa-utils.c: Likewise.
* ipa-inline.c: Likewise.
* matrix-reorg.c: Likewise.
* tree-eh.c: Likewise.
* tree-vectorizer.c: Likewise.
* ipa-split.c: Likewise.
* ipa.c: Likewise.
* trans-mem.c: Likewise.
* ipa-inline-analysis.c: Likewise.
* gimplify.c: Likewise.
* cfgexpand.c: Likewise.
* tree-sra.c: Likewise.
* ipa-prop.c: Likewise.
* varasm.c: Likewise.
* tree-nested.c: Likewise.
* tree-inline.c: Likewise.
* tree-profile.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* passes.c: Likewise.
* varpool.c: Likewise.
* tree.c: Update field referenced for new cgraph/varpool layout.
* decl2.c: Likewise.
* gcc-interface/trans.c (finalize_nrv): Update field referenced for new
cgraph/varpool layout.
* lto.c: Update field referenced for new cgraph/varpool layout.
* lto-partition.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186450 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-reference.c')
-rw-r--r-- | gcc/ipa-reference.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c index 7b45c653675..e7950688b40 100644 --- a/gcc/ipa-reference.c +++ b/gcc/ipa-reference.c @@ -200,7 +200,7 @@ ipa_reference_get_not_read_global (struct cgraph_node *fn) info = get_reference_optimization_summary (cgraph_function_node (fn, NULL)); if (info) return info->statics_not_read; - else if (flags_from_decl_or_type (fn->decl) & ECF_LEAF) + else if (flags_from_decl_or_type (fn->symbol.decl) & ECF_LEAF) return all_module_statics; else return NULL; @@ -219,7 +219,7 @@ ipa_reference_get_not_written_global (struct cgraph_node *fn) info = get_reference_optimization_summary (fn); if (info) return info->statics_not_written; - else if (flags_from_decl_or_type (fn->decl) & ECF_LEAF) + else if (flags_from_decl_or_type (fn->symbol.decl) & ECF_LEAF) return all_module_statics; else return NULL; @@ -310,9 +310,9 @@ propagate_bits (ipa_reference_global_vars_info_t x_global, struct cgraph_node *x /* Only look into nodes we can propagate something. */ if (avail > AVAIL_OVERWRITABLE || (avail == AVAIL_OVERWRITABLE - && (flags_from_decl_or_type (y->decl) & ECF_LEAF))) + && (flags_from_decl_or_type (y->symbol.decl) & ECF_LEAF))) { - int flags = flags_from_decl_or_type (y->decl); + int flags = flags_from_decl_or_type (y->symbol.decl); if (get_reference_vars_info (y)) { ipa_reference_vars_info_t y_info @@ -433,12 +433,12 @@ analyze_function (struct cgraph_node *fn) tree var; local = init_function_info (fn); - for (i = 0; ipa_ref_list_reference_iterate (&fn->ref_list, i, ref); i++) + for (i = 0; ipa_ref_list_reference_iterate (&fn->symbol.ref_list, i, ref); i++) { if (ref->refered_type != IPA_REF_VARPOOL) continue; - var = ipa_ref_varpool_node (ref)->decl; - if (ipa_ref_varpool_node (ref)->externally_visible + var = ipa_ref_varpool_node (ref)->symbol.decl; + if (ipa_ref_varpool_node (ref)->symbol.externally_visible || !ipa_ref_varpool_node (ref)->analyzed || !is_proper_for_analysis (var)) continue; @@ -580,7 +580,7 @@ static void read_write_all_from_decl (struct cgraph_node *node, bool * read_all, bool * write_all) { - tree decl = node->decl; + tree decl = node->symbol.decl; int flags = flags_from_decl_or_type (decl); if ((flags & ECF_LEAF) && cgraph_function_body_availability (node) <= AVAIL_OVERWRITABLE) @@ -692,7 +692,7 @@ propagate (void) /* If any node in a cycle is read_all or write_all they all are. */ - w_info = (struct ipa_dfs_info *) node->aux; + w_info = (struct ipa_dfs_info *) node->symbol.aux; w = w_info->next_cycle; while (w && (!read_all || !write_all)) { @@ -727,7 +727,7 @@ propagate (void) } } - w_info = (struct ipa_dfs_info *) w->aux; + w_info = (struct ipa_dfs_info *) w->symbol.aux; w = w_info->next_cycle; } @@ -751,14 +751,14 @@ propagate (void) } propagate_bits (node_g, node); - w_info = (struct ipa_dfs_info *) node->aux; + w_info = (struct ipa_dfs_info *) node->symbol.aux; w = w_info->next_cycle; while (w && (!read_all || !write_all)) { ipa_reference_vars_info_t w_ri = get_reference_vars_info (w); ipa_reference_local_vars_info_t w_l = &w_ri->local; - int flags = flags_from_decl_or_type (w->decl); + int flags = flags_from_decl_or_type (w->symbol.decl); /* These global bitmaps are initialized from the local info of all of the nodes in the region. However there is no @@ -773,13 +773,13 @@ propagate (void) bitmap_ior_into (node_g->statics_written, w_l->statics_written); propagate_bits (node_g, w); - w_info = (struct ipa_dfs_info *) w->aux; + w_info = (struct ipa_dfs_info *) w->symbol.aux; w = w_info->next_cycle; } /* All nodes within a cycle have the same global info bitmaps. */ node_info->global = *node_g; - w_info = (struct ipa_dfs_info *) node->aux; + w_info = (struct ipa_dfs_info *) node->symbol.aux; w = w_info->next_cycle; while (w) { @@ -788,7 +788,7 @@ propagate (void) w_ri->global = *node_g; - w_info = (struct ipa_dfs_info *) w->aux; + w_info = (struct ipa_dfs_info *) w->symbol.aux; w = w_info->next_cycle; } } @@ -830,7 +830,7 @@ propagate (void) get_static_name (index)); } - w_info = (struct ipa_dfs_info *) node->aux; + w_info = (struct ipa_dfs_info *) node->symbol.aux; w = w_info->next_cycle; while (w) { @@ -857,7 +857,7 @@ propagate (void) get_static_name (index)); } - w_info = (struct ipa_dfs_info *) w->aux; + w_info = (struct ipa_dfs_info *) w->symbol.aux; w = w_info->next_cycle; } fprintf (dump_file, "\n globals read: "); @@ -895,7 +895,7 @@ propagate (void) node_info = get_reference_vars_info (node); if (cgraph_function_body_availability (node) > AVAIL_OVERWRITABLE - || (flags_from_decl_or_type (node->decl) & ECF_LEAF)) + || (flags_from_decl_or_type (node->symbol.decl) & ECF_LEAF)) { node_g = &node_info->global; @@ -968,7 +968,7 @@ write_node_summary_p (struct cgraph_node *node, In future we might also want to include summaries of functions references by initializers of constant variables references in current unit. */ if (!reachable_from_this_partition_p (node, set) - && !referenced_from_this_partition_p (&node->ref_list, set, vset)) + && !referenced_from_this_partition_p (&node->symbol.ref_list, set, vset)) return false; /* See if the info has non-empty intersections with vars we want to encode. */ @@ -1035,12 +1035,12 @@ ipa_reference_write_optimization_summary (cgraph_node_set set, for (i = 0; i < lto_varpool_encoder_size (varpool_encoder); i++) { struct varpool_node *vnode = lto_varpool_encoder_deref (varpool_encoder, i); - if (!vnode->externally_visible + if (!vnode->symbol.externally_visible && vnode->analyzed - && bitmap_bit_p (all_module_statics, DECL_UID (vnode->decl)) - && referenced_from_this_partition_p (&vnode->ref_list, set, vset)) + && bitmap_bit_p (all_module_statics, DECL_UID (vnode->symbol.decl)) + && referenced_from_this_partition_p (&vnode->symbol.ref_list, set, vset)) { - tree decl = vnode->decl; + tree decl = vnode->symbol.decl; bitmap_set_bit (ltrans_statics, DECL_UID (decl)); splay_tree_insert (reference_vars_to_consider, DECL_UID (decl), (splay_tree_value)decl); |