From 04ec15fab9e10f969c2826268e471a0ab08ebd58 Mon Sep 17 00:00:00 2001 From: hubicka Date: Wed, 18 Apr 2012 09:57:53 +0000 Subject: * 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 --- gcc/cgraphbuild.c | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) (limited to 'gcc/cgraphbuild.c') diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c index 689cede526d..37059a223c9 100644 --- a/gcc/cgraphbuild.c +++ b/gcc/cgraphbuild.c @@ -77,7 +77,8 @@ record_reference (tree *tp, int *walk_subtrees, void *data) struct cgraph_node *node = cgraph_get_create_node (decl); if (!ctx->only_vars) cgraph_mark_address_taken_node (node); - ipa_record_reference (NULL, ctx->varpool_node, node, NULL, + ipa_record_reference ((symtab_node)ctx->varpool_node, + (symtab_node)node, IPA_REF_ADDR, NULL); } @@ -87,8 +88,8 @@ record_reference (tree *tp, int *walk_subtrees, void *data) if (lang_hooks.callgraph.analyze_expr) lang_hooks.callgraph.analyze_expr (&decl, walk_subtrees); varpool_mark_needed_node (vnode); - ipa_record_reference (NULL, ctx->varpool_node, - NULL, vnode, + ipa_record_reference ((symtab_node)ctx->varpool_node, + (symtab_node)vnode, IPA_REF_ADDR, NULL); } *walk_subtrees = 0; @@ -130,8 +131,8 @@ record_type_list (struct cgraph_node *node, tree list) { struct varpool_node *vnode = varpool_node (type); varpool_mark_needed_node (vnode); - ipa_record_reference (node, NULL, - NULL, vnode, + ipa_record_reference ((symtab_node)node, + (symtab_node)vnode, IPA_REF_ADDR, NULL); } } @@ -151,7 +152,7 @@ record_eh_tables (struct cgraph_node *node, struct function *fun) struct cgraph_node *per_node; per_node = cgraph_get_create_node (DECL_FUNCTION_PERSONALITY (node->symbol.decl)); - ipa_record_reference (node, NULL, per_node, NULL, IPA_REF_ADDR, NULL); + ipa_record_reference ((symtab_node)node, (symtab_node)per_node, IPA_REF_ADDR, NULL); cgraph_mark_address_taken_node (per_node); } @@ -232,8 +233,8 @@ mark_address (gimple stmt, tree addr, void *data) { struct cgraph_node *node = cgraph_get_create_node (addr); cgraph_mark_address_taken_node (node); - ipa_record_reference ((struct cgraph_node *)data, NULL, - node, NULL, + ipa_record_reference ((symtab_node)data, + (symtab_node)node, IPA_REF_ADDR, stmt); } else if (addr && TREE_CODE (addr) == VAR_DECL @@ -245,8 +246,8 @@ mark_address (gimple stmt, tree addr, void *data) if (lang_hooks.callgraph.analyze_expr) lang_hooks.callgraph.analyze_expr (&addr, &walk_subtrees); varpool_mark_needed_node (vnode); - ipa_record_reference ((struct cgraph_node *)data, NULL, - NULL, vnode, + ipa_record_reference ((symtab_node)data, + (symtab_node)vnode, IPA_REF_ADDR, stmt); } @@ -265,8 +266,8 @@ mark_load (gimple stmt, tree t, void *data) directly manipulated in the code. Pretend that it's an address. */ struct cgraph_node *node = cgraph_get_create_node (t); cgraph_mark_address_taken_node (node); - ipa_record_reference ((struct cgraph_node *)data, NULL, - node, NULL, + ipa_record_reference ((symtab_node)data, + (symtab_node)node, IPA_REF_ADDR, stmt); } else if (t && TREE_CODE (t) == VAR_DECL @@ -278,8 +279,8 @@ mark_load (gimple stmt, tree t, void *data) if (lang_hooks.callgraph.analyze_expr) lang_hooks.callgraph.analyze_expr (&t, &walk_subtrees); varpool_mark_needed_node (vnode); - ipa_record_reference ((struct cgraph_node *)data, NULL, - NULL, vnode, + ipa_record_reference ((symtab_node)data, + (symtab_node)vnode, IPA_REF_LOAD, stmt); } return false; @@ -300,8 +301,8 @@ mark_store (gimple stmt, tree t, void *data) if (lang_hooks.callgraph.analyze_expr) lang_hooks.callgraph.analyze_expr (&t, &walk_subtrees); varpool_mark_needed_node (vnode); - ipa_record_reference ((struct cgraph_node *)data, NULL, - NULL, vnode, + ipa_record_reference ((symtab_node)data, + (symtab_node)vnode, IPA_REF_STORE, stmt); } return false; @@ -348,19 +349,22 @@ build_cgraph_edges (void) && gimple_omp_parallel_child_fn (stmt)) { tree fn = gimple_omp_parallel_child_fn (stmt); - ipa_record_reference (node, NULL, cgraph_get_create_node (fn), - NULL, IPA_REF_ADDR, stmt); + ipa_record_reference ((symtab_node)node, + (symtab_node)cgraph_get_create_node (fn), + IPA_REF_ADDR, stmt); } if (gimple_code (stmt) == GIMPLE_OMP_TASK) { tree fn = gimple_omp_task_child_fn (stmt); if (fn) - ipa_record_reference (node, NULL, cgraph_get_create_node (fn), - NULL, IPA_REF_ADDR, stmt); + ipa_record_reference ((symtab_node)node, + (symtab_node) cgraph_get_create_node (fn), + IPA_REF_ADDR, stmt); fn = gimple_omp_task_copy_fn (stmt); if (fn) - ipa_record_reference (node, NULL, cgraph_get_create_node (fn), - NULL, IPA_REF_ADDR, stmt); + ipa_record_reference ((symtab_node)node, + (symtab_node)cgraph_get_create_node (fn), + IPA_REF_ADDR, stmt); } } for (gsi = gsi_start (phi_nodes (bb)); !gsi_end_p (gsi); gsi_next (&gsi)) -- cgit v1.2.1