diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-18 09:57:53 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-18 09:57:53 +0000 |
commit | 04ec15fab9e10f969c2826268e471a0ab08ebd58 (patch) | |
tree | 557443c354065839ba2b0035e3d525377e5293fa /gcc/lto-cgraph.c | |
parent | e24c256de02eecbde481f48e19ed3779f4020739 (diff) | |
download | gcc-04ec15fab9e10f969c2826268e471a0ab08ebd58.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186564 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r-- | gcc/lto-cgraph.c | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index e6365b46ce8..18152a8af06 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -326,18 +326,18 @@ referenced_from_other_partition_p (struct ipa_ref_list *list, cgraph_node_set se { int i; struct ipa_ref *ref; - for (i = 0; ipa_ref_list_refering_iterate (list, i, ref); i++) + for (i = 0; ipa_ref_list_referring_iterate (list, i, ref); i++) { - if (ref->refering_type == IPA_REF_CGRAPH) + if (symtab_function_p (ref->referring)) { - if (ipa_ref_refering_node (ref)->symbol.in_other_partition - || !cgraph_node_in_set_p (ipa_ref_refering_node (ref), set)) + if (ipa_ref_referring_node (ref)->symbol.in_other_partition + || !cgraph_node_in_set_p (ipa_ref_referring_node (ref), set)) return true; } else { - if (ipa_ref_refering_varpool_node (ref)->symbol.in_other_partition - || !varpool_node_in_set_p (ipa_ref_refering_varpool_node (ref), + if (ipa_ref_referring_varpool_node (ref)->symbol.in_other_partition + || !varpool_node_in_set_p (ipa_ref_referring_varpool_node (ref), vset)) return true; } @@ -370,16 +370,16 @@ referenced_from_this_partition_p (struct ipa_ref_list *list, cgraph_node_set set { int i; struct ipa_ref *ref; - for (i = 0; ipa_ref_list_refering_iterate (list, i, ref); i++) + for (i = 0; ipa_ref_list_referring_iterate (list, i, ref); i++) { - if (ref->refering_type == IPA_REF_CGRAPH) + if (symtab_function_p (ref->referring)) { - if (cgraph_node_in_set_p (ipa_ref_refering_node (ref), set)) + if (cgraph_node_in_set_p (ipa_ref_referring_node (ref), set)) return true; } else { - if (varpool_node_in_set_p (ipa_ref_refering_varpool_node (ref), + if (varpool_node_in_set_p (ipa_ref_referring_varpool_node (ref), vset)) return true; } @@ -614,10 +614,10 @@ lto_output_ref (struct lto_simple_output_block *ob, struct ipa_ref *ref, { struct bitpack_d bp; bp = bitpack_create (ob->main_stream); - bp_pack_value (&bp, ref->refered_type, 1); + bp_pack_value (&bp, symtab_function_p (ref->referred), 1); bp_pack_value (&bp, ref->use, 2); streamer_write_bitpack (&bp); - if (ref->refered_type == IPA_REF_CGRAPH) + if (symtab_function_p (ref->referred)) { int nref = lto_cgraph_encoder_lookup (encoder, ipa_ref_node (ref)); gcc_assert (nref != LCC_NOT_FOUND); @@ -674,7 +674,7 @@ add_references (lto_cgraph_encoder_t encoder, int i; struct ipa_ref *ref; for (i = 0; ipa_ref_list_reference_iterate (list, i, ref); i++) - if (ref->refered_type == IPA_REF_CGRAPH) + if (symtab_function_p (ref->referred)) add_node_to (encoder, ipa_ref_node (ref), false); else { @@ -1108,27 +1108,26 @@ input_varpool_node (struct lto_file_decl_data *file_data, static void input_ref (struct lto_input_block *ib, - struct cgraph_node *refering_node, - struct varpool_node *refering_varpool_node, + symtab_node referring_node, VEC(cgraph_node_ptr, heap) *nodes, VEC(varpool_node_ptr, heap) *varpool_nodes_vec) { struct cgraph_node *node = NULL; struct varpool_node *varpool_node = NULL; struct bitpack_d bp; - enum ipa_ref_type type; + int type; enum ipa_ref_use use; bp = streamer_read_bitpack (ib); - type = (enum ipa_ref_type) bp_unpack_value (&bp, 1); + type = bp_unpack_value (&bp, 1); use = (enum ipa_ref_use) bp_unpack_value (&bp, 2); - if (type == IPA_REF_CGRAPH) + if (type) node = VEC_index (cgraph_node_ptr, nodes, streamer_read_hwi (ib)); else varpool_node = VEC_index (varpool_node_ptr, varpool_nodes_vec, streamer_read_hwi (ib)); - ipa_record_reference (refering_node, refering_varpool_node, - node, varpool_node, use, NULL); + ipa_record_reference (referring_node, + node ? (symtab_node) node : (symtab_node) varpool_node, use, NULL); } /* Read an edge from IB. NODES points to a vector of previously read nodes for @@ -1324,7 +1323,7 @@ input_refs (struct lto_input_block *ib, node = VEC_index (cgraph_node_ptr, nodes, idx); while (count) { - input_ref (ib, node, NULL, nodes, varpool); + input_ref (ib, (symtab_node) node, nodes, varpool); count--; } } @@ -1338,7 +1337,7 @@ input_refs (struct lto_input_block *ib, streamer_read_uhwi (ib)); while (count) { - input_ref (ib, NULL, node, nodes, varpool); + input_ref (ib, (symtab_node) node, nodes, varpool); count--; } } |