diff options
author | Jan Hubicka <jh@suse.cz> | 2012-04-14 12:24:59 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2012-04-14 10:24:59 +0000 |
commit | 960bfb6929fa5c463267b962b9ff9dabdb6df3f3 (patch) | |
tree | 7b0127a94d4c70c75f4d133c7806c59bc61566c2 /gcc/lto-streamer-out.c | |
parent | 30d1ab7583da1d36deae5885fe9c92608cb6e929 (diff) | |
download | gcc-960bfb6929fa5c463267b962b9ff9dabdb6df3f3.zip gcc-960bfb6929fa5c463267b962b9ff9dabdb6df3f3.tar.gz gcc-960bfb6929fa5c463267b962b9ff9dabdb6df3f3.tar.bz2 |
cgraph.h: Update copyrights;
* 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.
From-SVN: r186450
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r-- | gcc/lto-streamer-out.c | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index 054bb85..fa6a3dc 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -784,7 +784,7 @@ output_function (struct cgraph_node *node) basic_block bb; struct output_block *ob; - function = node->decl; + function = node->symbol.decl; fn = DECL_STRUCT_FUNCTION (function); ob = create_output_block (LTO_section_function_body); @@ -904,11 +904,13 @@ output_alias_pair_p (alias_pair *p, symbol_alias_set_t *defined, { vnode = varpool_get_node (p->decl); return (vnode - && referenced_from_this_partition_p (&vnode->ref_list, set, vset)); + && referenced_from_this_partition_p (&vnode->symbol.ref_list, + set, vset)); } node = cgraph_get_node (p->decl); return (node - && (referenced_from_this_partition_p (&node->ref_list, set, vset) + && (referenced_from_this_partition_p (&node->symbol.ref_list, + set, vset) || reachable_from_this_partition_p (node, set))); } else @@ -1023,8 +1025,8 @@ lto_output_toplevel_asms (void) static void copy_function (struct cgraph_node *node) { - tree function = node->decl; - struct lto_file_decl_data *file_data = node->local.lto_file_data; + tree function = node->symbol.decl; + struct lto_file_decl_data *file_data = node->symbol.lto_file_data; struct lto_output_stream *output_stream = XCNEW (struct lto_output_stream); const char *data; size_t len; @@ -1051,7 +1053,7 @@ copy_function (struct cgraph_node *node) /* Copy decls. */ in_state = - lto_get_function_in_decl_state (node->local.lto_file_data, function); + lto_get_function_in_decl_state (node->symbol.lto_file_data, function); gcc_assert (in_state); for (i = 0; i < LTO_N_DECL_STREAMS; i++) @@ -1102,18 +1104,18 @@ lto_output (cgraph_node_set set, varpool_node_set vset) && !node->thunk.thunk_p) { #ifdef ENABLE_CHECKING - gcc_assert (!bitmap_bit_p (output, DECL_UID (node->decl))); - bitmap_set_bit (output, DECL_UID (node->decl)); + gcc_assert (!bitmap_bit_p (output, DECL_UID (node->symbol.decl))); + bitmap_set_bit (output, DECL_UID (node->symbol.decl)); #endif decl_state = lto_new_out_decl_state (); lto_push_out_decl_state (decl_state); - if (gimple_has_body_p (node->decl)) + if (gimple_has_body_p (node->symbol.decl)) output_function (node); else copy_function (node); gcc_assert (lto_get_out_decl_state () == decl_state); lto_pop_out_decl_state (); - lto_record_function_out_decl_state (node->decl, decl_state); + lto_record_function_out_decl_state (node->symbol.decl, decl_state); } } @@ -1417,64 +1419,64 @@ produce_symtab (struct output_block *ob, for (i = 0; i < lto_cgraph_encoder_size (encoder); i++) { node = lto_cgraph_encoder_deref (encoder, i); - if (DECL_EXTERNAL (node->decl)) + if (DECL_EXTERNAL (node->symbol.decl)) continue; - if (DECL_COMDAT (node->decl) + if (DECL_COMDAT (node->symbol.decl) && cgraph_comdat_can_be_unshared_p (node)) continue; if ((node->alias && !node->thunk.alias) || node->global.inlined_to) continue; - write_symbol (cache, &stream, node->decl, seen, false); + write_symbol (cache, &stream, node->symbol.decl, seen, false); } for (i = 0; i < lto_cgraph_encoder_size (encoder); i++) { node = lto_cgraph_encoder_deref (encoder, i); - if (!DECL_EXTERNAL (node->decl)) + if (!DECL_EXTERNAL (node->symbol.decl)) continue; /* We keep around unused extern inlines in order to be able to inline them indirectly or via vtables. Do not output them to symbol table: they end up being undefined and just consume space. */ - if (!node->address_taken && !node->callers) + if (!node->symbol.address_taken && !node->callers) continue; - if (DECL_COMDAT (node->decl) + if (DECL_COMDAT (node->symbol.decl) && cgraph_comdat_can_be_unshared_p (node)) continue; if ((node->alias && !node->thunk.alias) || node->global.inlined_to) continue; - write_symbol (cache, &stream, node->decl, seen, false); + write_symbol (cache, &stream, node->symbol.decl, seen, false); } /* Write all variables. */ for (i = 0; i < lto_varpool_encoder_size (varpool_encoder); i++) { vnode = lto_varpool_encoder_deref (varpool_encoder, i); - if (DECL_EXTERNAL (vnode->decl)) + if (DECL_EXTERNAL (vnode->symbol.decl)) continue; /* COMDAT virtual tables can be unshared. Do not declare them in the LTO symbol table to prevent linker from forcing them into the output. */ - if (DECL_COMDAT (vnode->decl) + if (DECL_COMDAT (vnode->symbol.decl) && !vnode->force_output && vnode->finalized - && DECL_VIRTUAL_P (vnode->decl)) + && DECL_VIRTUAL_P (vnode->symbol.decl)) continue; if (vnode->alias && !vnode->alias_of) continue; - write_symbol (cache, &stream, vnode->decl, seen, false); + write_symbol (cache, &stream, vnode->symbol.decl, seen, false); } for (i = 0; i < lto_varpool_encoder_size (varpool_encoder); i++) { vnode = lto_varpool_encoder_deref (varpool_encoder, i); - if (!DECL_EXTERNAL (vnode->decl)) + if (!DECL_EXTERNAL (vnode->symbol.decl)) continue; - if (DECL_COMDAT (vnode->decl) + if (DECL_COMDAT (vnode->symbol.decl) && !vnode->force_output && vnode->finalized - && DECL_VIRTUAL_P (vnode->decl)) + && DECL_VIRTUAL_P (vnode->symbol.decl)) continue; if (vnode->alias && !vnode->alias_of) continue; - write_symbol (cache, &stream, vnode->decl, seen, false); + write_symbol (cache, &stream, vnode->symbol.decl, seen, false); } /* Write all aliases. */ |