From 5932a4d411f30d1a07789f28528a2c57fb8e33e4 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Wed, 18 Apr 2012 11:57:53 +0200 Subject: 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 --- gcc/ipa-ref.h | 43 ++++++++++++++----------------------------- 1 file changed, 14 insertions(+), 29 deletions(-) (limited to 'gcc/ipa-ref.h') diff --git a/gcc/ipa-ref.h b/gcc/ipa-ref.h index 2fdb6ba..96750ba 100644 --- a/gcc/ipa-ref.h +++ b/gcc/ipa-ref.h @@ -21,6 +21,10 @@ along with GCC; see the file COPYING3. If not see struct cgraph_node; struct varpool_node; +union symtab_node_def; +typedef union symtab_node_def *symtab_node; +typedef const union symtab_node_def *const_symtab_node; + /* How the reference is done. */ enum GTY(()) ipa_ref_use @@ -31,30 +35,13 @@ enum GTY(()) ipa_ref_use IPA_REF_ALIAS }; -/* Type of refering or refered type. */ -enum GTY(()) ipa_ref_type -{ - IPA_REF_CGRAPH, - IPA_REF_VARPOOL -}; - -/* We can have references spanning both callgraph and varpool, - so all pointers needs to be of both types. */ -union GTY(()) ipa_ref_ptr_u -{ - struct cgraph_node * GTY((tag ("IPA_REF_CGRAPH"))) cgraph_node; - struct varpool_node * GTY((tag ("IPA_REF_VARPOOL"))) varpool_node; -}; - /* Record of reference in callgraph or varpool. */ struct GTY(()) ipa_ref { - union ipa_ref_ptr_u GTY ((desc ("%1.refering_type"))) refering; - union ipa_ref_ptr_u GTY ((desc ("%1.refered_type"))) refered; + symtab_node referring; + symtab_node referred; gimple stmt; - unsigned int refered_index; - ENUM_BITFIELD (ipa_ref_type) refering_type:1; - ENUM_BITFIELD (ipa_ref_type) refered_type:1; + unsigned int referred_index; ENUM_BITFIELD (ipa_ref_use) use:2; }; @@ -73,21 +60,19 @@ struct GTY(()) ipa_ref_list VEC(ipa_ref_t,gc) *references; /* Refering is vector of pointers to references. It must not live in GGC space or GGC will try to mark middle of references vectors. */ - VEC(ipa_ref_ptr,heap) * GTY((skip)) refering; + VEC(ipa_ref_ptr,heap) * GTY((skip)) referring; }; -struct ipa_ref * ipa_record_reference (struct cgraph_node *, - struct varpool_node *, - struct cgraph_node *, - struct varpool_node *, +struct ipa_ref * ipa_record_reference (symtab_node, + symtab_node, enum ipa_ref_use, gimple); void ipa_remove_reference (struct ipa_ref *); void ipa_remove_all_references (struct ipa_ref_list *); -void ipa_remove_all_refering (struct ipa_ref_list *); +void ipa_remove_all_referring (struct ipa_ref_list *); void ipa_dump_references (FILE *, struct ipa_ref_list *); -void ipa_dump_refering (FILE *, struct ipa_ref_list *); -void ipa_clone_references (struct cgraph_node *, struct varpool_node *, struct ipa_ref_list *); -void ipa_clone_refering (struct cgraph_node *, struct varpool_node *, struct ipa_ref_list *); +void ipa_dump_referring (FILE *, struct ipa_ref_list *); +void ipa_clone_references (symtab_node, struct ipa_ref_list *); +void ipa_clone_referring (symtab_node, struct ipa_ref_list *); bool ipa_ref_cannot_lead_to_return (struct ipa_ref *); bool ipa_ref_has_aliases_p (struct ipa_ref_list *); -- cgit v1.1