summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-31 21:26:14 +0000
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>2013-10-31 21:26:14 +0000
commit452659afd19793cef456ed9d607f88ed0106700d (patch)
treef027b7dfe45942a8ae7ec9d539dbfe1b2330a706
parenta908ea1c7c717dd7a0bb313377fc2ca3960e06d3 (diff)
downloadgcc-452659afd19793cef456ed9d607f88ed0106700d.tar.gz
Automated part of renaming of symtab_node_base to symtab_node.
gcc/ Patch autogenerated by rename_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 with ChangeLog entry fixed up by hand. * cgraph.c (x_cgraph_nodes_queue): Rename symtab_node_base to symtab_node. (cgraph_node_for_asm): Likewise. * cgraph.h (symtab_node_base): Likewise. (cgraph_node): Likewise. (varpool_node): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (is_a_helper <varpool_node>::test): Likewise. (symtab_nodes): Likewise. (symtab_register_node): Likewise. (symtab_unregister_node): Likewise. (symtab_remove_node): Likewise. (symtab_get_node): Likewise. (symtab_node_for_asm): Likewise. (symtab_node_asm_name): Likewise. (symtab_node_name): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (dump_symtab_node): Likewise. (debug_symtab_node): Likewise. (dump_symtab_base): Likewise. (verify_symtab_node): Likewise. (verify_symtab_base): Likewise. (symtab_used_from_object_file_p): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_nonoverwritable_alias): Likewise. (availability symtab_node_availability): Likewise. (symtab_semantically_equivalent_p): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_prevail_in_asm_name_hash): Likewise. (cgraph): Likewise. (varpool): Likewise. (varpool_first_variable): Likewise. (varpool_next_variable): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_defined_variable): Likewise. (cgraph_first_defined_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (symtab_alias_target): Likewise. (symtab_real_symbol_p): Likewise. (symtab_can_be_discarded): Likewise. * cgraphbuild.c (mark_address): Likewise. (mark_load): Likewise. (mark_store): Likewise. * cgraphunit.c (decide_is_symbol_needed): Likewise. (first): Likewise. (enqueue_node): Likewise. (referred_to_p): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_functions): Likewise. (handle_alias_pairs): Likewise. (output_weakrefs): Likewise. (compile): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. * ipa-prop.c (remove_described_reference): Likewise. (try_decrement_rdesc_refcount): Likewise. (ipa_edge_duplication_hook): Likewise. * ipa-ref.c (ipa_record_reference): Likewise. (ipa_maybe_record_reference): Likewise. (ipa_clone_ref): Likewise. (ipa_clone_references): Likewise. (ipa_clone_referring): Likewise. (ipa_find_reference): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_clear_stmts_in_references): Likewise. * ipa-ref.h (symtab_node_base): Likewise. (ipa_ref): Likewise. (ipa_record_reference): Likewise. (ipa_maybe_record_reference): Likewise. (ipa_clone_references): Likewise. (ipa_clone_referring): Likewise. (ipa_clone_ref): Likewise. (ipa_find_reference): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_clear_stmts_in_references): Likewise. * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise. * ipa.c (enqueue_node): Likewise. (process_references): Likewise. (walk_polymorphic_call_targets): Likewise. (symtab_remove_unreachable_nodes): Likewise. (address_taken_from_non_vtable_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (comdat_can_be_unshared_p): Likewise. (can_replace_by_local_alias): Likewise. (function_and_variable_visibility): Likewise. * is-a.h: Likewise (within example in comment). * lto-cgraph.c (input_cgraph_opt_summary): Likewise. (lto_symtab_encoder_encode): Likewise. (lto_symtab_encoder_delete_node): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (output_refs): Likewise. (compute_ltrans_boundary): Likewise. (output_symtab): Likewise. (input_node): Likewise. (input_ref): Likewise. (input_edge): Likewise. (input_cgraph_1): Likewise. (input_refs): Likewise. (output_cgraph_opt_summary): Likewise. (input_node_opt_summary): Likewise. (input_cgraph_opt_section): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-out.c (lto_output): Likewise. (output_symbol_p): Likewise. (produce_symtab): Likewise. * lto-streamer.h (lto_encoder_entry): Likewise. (lto_free_function_in_decl_state_for_node): Likewise. (lto_symtab_encoder_encode): Likewise. (lto_symtab_encoder_delete_node): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_lookup): Likewise. (lsei_node): Likewise. (lto_symtab_encoder_deref): Likewise. * symtab.c (symtab_hash): Likewise. (assembler_name_hash): Likewise. (symtab_nodes): Likewise. (hash_node): Likewise. (eq_node): Likewise. (hash_node_by_assembler_name): Likewise. (eq_assembler_name): Likewise. (insert_to_assembler_name_hash): Likewise. (unlink_from_assembler_name_hash): Likewise. (symtab_prevail_in_asm_name_hash): Likewise. (symtab_register_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_unregister_node): Likewise. (symtab_get_node): Likewise. (symtab_remove_node): Likewise. (symtab_initialize_asm_name_hash): Likewise. (symtab_node_for_asm): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_node_asm_name): Likewise. (symtab_node_name): Likewise. (dump_symtab_base): Likewise. (dump_symtab_node): Likewise. (dump_symtab): Likewise. (debug_symtab_node): Likewise. (verify_symtab_base): Likewise. (verify_symtab_node): Likewise. (verify_symtab): Likewise. (symtab_used_from_object_file_p): Likewise. (symtab_node_availability): Likewise. (symtab_alias_ultimate_target): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_resolve_alias): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_semantically_equivalent_p): Likewise. * value-prof.c (init_node_map): Likewise. * varasm.c (find_decl): Likewise. * varpool.c (varpool_node_for_asm): Likewise. (varpool_remove_unreferenced_decls): Likewise. gcc/c-family/ Patch autogenerated by rename_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename symtab_node_base to symtab_node. gcc/lto/ Patch autogenerated by rename_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (add_symbol_to_partition): Rename symtab_node_base to symtab_node. (get_symbol_class): Likewise. (symbol_partitioned_p): Likewise. (add_references_to_partition): Likewise. (add_symbol_to_partition_1): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition): Likewise. (lto_1_to_1_map): Likewise. (lto_max_map): Likewise. (lto_balanced_map): Likewise. (privatize_symbol_name): Likewise. (promote_symbol): Likewise. (may_need_named_section_p): Likewise. (rename_statics): Likewise. (lto_promote_statics_nonwpa): Likewise. * lto-symtab.c (lto_symtab_merge): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_prevailing_decl): Likewise. * lto.c (lto_wpa_write_files): Likewise. (read_cgraph_and_symbols): Likewise. (do_whole_program_analysis): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204279 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog180
-rw-r--r--gcc/c-family/ChangeLog11
-rw-r--r--gcc/c-family/c-pragma.c2
-rw-r--r--gcc/cgraph.c4
-rw-r--r--gcc/cgraph.h110
-rw-r--r--gcc/cgraphbuild.c10
-rw-r--r--gcc/cgraphunit.c34
-rw-r--r--gcc/gimple-fold.c2
-rw-r--r--gcc/ipa-inline-analysis.c4
-rw-r--r--gcc/ipa-prop.c6
-rw-r--r--gcc/ipa-ref.c20
-rw-r--r--gcc/ipa-ref.h24
-rw-r--r--gcc/ipa-reference.c6
-rw-r--r--gcc/ipa.c30
-rw-r--r--gcc/is-a.h6
-rw-r--r--gcc/lto-cgraph.c50
-rw-r--r--gcc/lto-section-in.c2
-rw-r--r--gcc/lto-streamer-out.c8
-rw-r--r--gcc/lto-streamer.h18
-rw-r--r--gcc/lto/ChangeLog39
-rw-r--r--gcc/lto/lto-partition.c42
-rw-r--r--gcc/lto/lto-symtab.c44
-rw-r--r--gcc/lto/lto.c8
-rw-r--r--gcc/symtab.c140
-rw-r--r--gcc/value-prof.c4
-rw-r--r--gcc/varasm.c2
-rw-r--r--gcc/varpool.c4
27 files changed, 520 insertions, 290 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2558619a4f1..2a1b27130d6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,185 @@
2013-10-31 David Malcolm <dmalcolm@redhat.com>
+ Automated part of renaming of symtab_node_base to symtab_node.
+
+ Patch autogenerated by rename_symtab.py from
+ https://github.com/davidmalcolm/gcc-refactoring-scripts
+ revision 58bb219cc090b2f4516a9297d868c245495ee622
+ with ChangeLog entry fixed up by hand.
+
+ * cgraph.c (x_cgraph_nodes_queue): Rename symtab_node_base to
+ symtab_node.
+ (cgraph_node_for_asm): Likewise.
+ * cgraph.h (symtab_node_base): Likewise.
+ (cgraph_node): Likewise.
+ (varpool_node): Likewise.
+ (is_a_helper <cgraph_node>::test): Likewise.
+ (is_a_helper <varpool_node>::test): Likewise.
+ (symtab_nodes): Likewise.
+ (symtab_register_node): Likewise.
+ (symtab_unregister_node): Likewise.
+ (symtab_remove_node): Likewise.
+ (symtab_get_node): Likewise.
+ (symtab_node_for_asm): Likewise.
+ (symtab_node_asm_name): Likewise.
+ (symtab_node_name): Likewise.
+ (symtab_insert_node_to_hashtable): Likewise.
+ (symtab_add_to_same_comdat_group): Likewise.
+ (symtab_dissolve_same_comdat_group_list): Likewise.
+ (dump_symtab_node): Likewise.
+ (debug_symtab_node): Likewise.
+ (dump_symtab_base): Likewise.
+ (verify_symtab_node): Likewise.
+ (verify_symtab_base): Likewise.
+ (symtab_used_from_object_file_p): Likewise.
+ (symtab_alias_ultimate_target): Likewise.
+ (symtab_resolve_alias): Likewise.
+ (fixup_same_cpp_alias_visibility): Likewise.
+ (symtab_for_node_and_aliases): Likewise.
+ (symtab_nonoverwritable_alias): Likewise.
+ (availability symtab_node_availability): Likewise.
+ (symtab_semantically_equivalent_p): Likewise.
+ (fixup_same_cpp_alias_visibility): Likewise.
+ (symtab_prevail_in_asm_name_hash): Likewise.
+ (cgraph): Likewise.
+ (varpool): Likewise.
+ (varpool_first_variable): Likewise.
+ (varpool_next_variable): Likewise.
+ (varpool_first_static_initializer): Likewise.
+ (varpool_next_static_initializer): Likewise.
+ (varpool_first_defined_variable): Likewise.
+ (varpool_next_defined_variable): Likewise.
+ (cgraph_first_defined_function): Likewise.
+ (cgraph_next_defined_function): Likewise.
+ (cgraph_first_function): Likewise.
+ (cgraph_next_function): Likewise.
+ (cgraph_first_function_with_gimple_body): Likewise.
+ (cgraph_next_function_with_gimple_body): Likewise.
+ (symtab_alias_target): Likewise.
+ (symtab_real_symbol_p): Likewise.
+ (symtab_can_be_discarded): Likewise.
+ * cgraphbuild.c (mark_address): Likewise.
+ (mark_load): Likewise.
+ (mark_store): Likewise.
+ * cgraphunit.c (decide_is_symbol_needed): Likewise.
+ (first): Likewise.
+ (enqueue_node): Likewise.
+ (referred_to_p): Likewise.
+ (cgraph_process_same_body_aliases): Likewise.
+ (analyze_functions): Likewise.
+ (handle_alias_pairs): Likewise.
+ (output_weakrefs): Likewise.
+ (compile): Likewise.
+ * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise.
+ * ipa-inline-analysis.c (inline_write_summary): Likewise.
+ * ipa-prop.c (remove_described_reference): Likewise.
+ (try_decrement_rdesc_refcount): Likewise.
+ (ipa_edge_duplication_hook): Likewise.
+ * ipa-ref.c (ipa_record_reference): Likewise.
+ (ipa_maybe_record_reference): Likewise.
+ (ipa_clone_ref): Likewise.
+ (ipa_clone_references): Likewise.
+ (ipa_clone_referring): Likewise.
+ (ipa_find_reference): Likewise.
+ (ipa_remove_stmt_references): Likewise.
+ (ipa_clear_stmts_in_references): Likewise.
+ * ipa-ref.h (symtab_node_base): Likewise.
+ (ipa_ref): Likewise.
+ (ipa_record_reference): Likewise.
+ (ipa_maybe_record_reference): Likewise.
+ (ipa_clone_references): Likewise.
+ (ipa_clone_referring): Likewise.
+ (ipa_clone_ref): Likewise.
+ (ipa_find_reference): Likewise.
+ (ipa_remove_stmt_references): Likewise.
+ (ipa_clear_stmts_in_references): Likewise.
+ * ipa-reference.c (ipa_reference_write_optimization_summary):
+ Likewise.
+ * ipa.c (enqueue_node): Likewise.
+ (process_references): Likewise.
+ (walk_polymorphic_call_targets): Likewise.
+ (symtab_remove_unreachable_nodes): Likewise.
+ (address_taken_from_non_vtable_p): Likewise.
+ (comdat_can_be_unshared_p_1): Likewise.
+ (comdat_can_be_unshared_p): Likewise.
+ (can_replace_by_local_alias): Likewise.
+ (function_and_variable_visibility): Likewise.
+ * is-a.h: Likewise (within example in comment).
+ * lto-cgraph.c (input_cgraph_opt_summary): Likewise.
+ (lto_symtab_encoder_encode): Likewise.
+ (lto_symtab_encoder_delete_node): Likewise.
+ (lto_symtab_encoder_in_partition_p): Likewise.
+ (lto_set_symtab_encoder_in_partition): Likewise.
+ (output_refs): Likewise.
+ (compute_ltrans_boundary): Likewise.
+ (output_symtab): Likewise.
+ (input_node): Likewise.
+ (input_ref): Likewise.
+ (input_edge): Likewise.
+ (input_cgraph_1): Likewise.
+ (input_refs): Likewise.
+ (output_cgraph_opt_summary): Likewise.
+ (input_node_opt_summary): Likewise.
+ (input_cgraph_opt_section): Likewise.
+ * lto-section-in.c (lto_free_function_in_decl_state_for_node):
+ Likewise.
+ * lto-streamer-out.c (lto_output): Likewise.
+ (output_symbol_p): Likewise.
+ (produce_symtab): Likewise.
+ * lto-streamer.h (lto_encoder_entry): Likewise.
+ (lto_free_function_in_decl_state_for_node): Likewise.
+ (lto_symtab_encoder_encode): Likewise.
+ (lto_symtab_encoder_delete_node): Likewise.
+ (lto_symtab_encoder_in_partition_p): Likewise.
+ (lto_set_symtab_encoder_in_partition): Likewise.
+ (lto_symtab_encoder_lookup): Likewise.
+ (lsei_node): Likewise.
+ (lto_symtab_encoder_deref): Likewise.
+ * symtab.c (symtab_hash): Likewise.
+ (assembler_name_hash): Likewise.
+ (symtab_nodes): Likewise.
+ (hash_node): Likewise.
+ (eq_node): Likewise.
+ (hash_node_by_assembler_name): Likewise.
+ (eq_assembler_name): Likewise.
+ (insert_to_assembler_name_hash): Likewise.
+ (unlink_from_assembler_name_hash): Likewise.
+ (symtab_prevail_in_asm_name_hash): Likewise.
+ (symtab_register_node): Likewise.
+ (symtab_insert_node_to_hashtable): Likewise.
+ (symtab_unregister_node): Likewise.
+ (symtab_get_node): Likewise.
+ (symtab_remove_node): Likewise.
+ (symtab_initialize_asm_name_hash): Likewise.
+ (symtab_node_for_asm): Likewise.
+ (symtab_add_to_same_comdat_group): Likewise.
+ (symtab_dissolve_same_comdat_group_list): Likewise.
+ (symtab_node_asm_name): Likewise.
+ (symtab_node_name): Likewise.
+ (dump_symtab_base): Likewise.
+ (dump_symtab_node): Likewise.
+ (dump_symtab): Likewise.
+ (debug_symtab_node): Likewise.
+ (verify_symtab_base): Likewise.
+ (verify_symtab_node): Likewise.
+ (verify_symtab): Likewise.
+ (symtab_used_from_object_file_p): Likewise.
+ (symtab_node_availability): Likewise.
+ (symtab_alias_ultimate_target): Likewise.
+ (fixup_same_cpp_alias_visibility): Likewise.
+ (symtab_resolve_alias): Likewise.
+ (symtab_for_node_and_aliases): Likewise.
+ (symtab_for_node_and_aliases): Likewise.
+ (symtab_nonoverwritable_alias_1): Likewise.
+ (symtab_nonoverwritable_alias): Likewise.
+ (symtab_semantically_equivalent_p): Likewise.
+ * value-prof.c (init_node_map): Likewise.
+ * varasm.c (find_decl): Likewise.
+ * varpool.c (varpool_node_for_asm): Likewise.
+ (varpool_remove_unreferenced_decls): Likewise.
+
+2013-10-31 David Malcolm <dmalcolm@redhat.com>
+
Manual part of renaming of symtab_node_base to symtab_node.
* ipa-ref.h (symtab_node): Remove typedef to pointer type, as it
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 3fa9d137b32..13a66871c3a 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,14 @@
+2013-10-31 David Malcolm <dmalcolm@redhat.com>
+
+ Automated part of renaming of symtab_node_base to symtab_node.
+
+ Patch autogenerated by rename_symtab.py from
+ https://github.com/davidmalcolm/gcc-refactoring-scripts
+ revision 58bb219cc090b2f4516a9297d868c245495ee622
+
+ * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
+ symtab_node_base to symtab_node.
+
2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
Implement C++14 digit separators.
diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c
index 752a40d8e77..3ce77a2e91a 100644
--- a/gcc/c-family/c-pragma.c
+++ b/gcc/c-family/c-pragma.c
@@ -307,7 +307,7 @@ maybe_apply_pending_pragma_weaks (void)
tree alias_id, id, decl;
int i;
pending_weak *pe;
- symtab_node target;
+ symtab_node *target;
if (!pending_weaks)
return;
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 4a4e9ac97d4..f3666fab6dd 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -64,7 +64,7 @@ static inline void cgraph_edge_remove_caller (struct cgraph_edge *e);
static inline void cgraph_edge_remove_callee (struct cgraph_edge *e);
/* Queue of cgraph nodes scheduled to be lowered. */
-symtab_node x_cgraph_nodes_queue;
+symtab_node *x_cgraph_nodes_queue;
#define cgraph_nodes_queue ((struct cgraph_node *)x_cgraph_nodes_queue)
/* Number of nodes in existence. */
@@ -647,7 +647,7 @@ struct cgraph_node *
cgraph_node_for_asm (tree asmname)
{
/* We do not want to look at inline clones. */
- for (symtab_node node = symtab_node_for_asm (asmname);
+ for (symtab_node *node = symtab_node_for_asm (asmname);
node;
node = node->next_sharing_asm_name)
{
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 9171a79a8f7..4f93713b889 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -41,7 +41,7 @@ enum symtab_type
The symtab_node is inherited by cgraph and varpol nodes. */
class GTY((desc ("%h.type"), tag ("SYMTAB_SYMBOL"),
chain_next ("%h.next"), chain_prev ("%h.previous")))
- symtab_node_base
+ symtab_node
{
public:
/* Type of the symbol. */
@@ -113,8 +113,8 @@ public:
tree decl;
/* Linked list of symbol table entries starting with symtab_nodes. */
- symtab_node next;
- symtab_node previous;
+ symtab_node *next;
+ symtab_node *previous;
/* Linked list of symbols with the same asm name. There may be multiple
entries for single symbol name during LTO, because symbols are renamed
@@ -125,11 +125,11 @@ public:
There are also several long standing bugs where frontends and builtin
code produce duplicated decls. */
- symtab_node next_sharing_asm_name;
- symtab_node previous_sharing_asm_name;
+ symtab_node *next_sharing_asm_name;
+ symtab_node *previous_sharing_asm_name;
/* Circular list of nodes in the same comdat group if non-NULL. */
- symtab_node same_comdat_group;
+ symtab_node *same_comdat_group;
/* Vectors of referring and referenced entities. */
struct ipa_ref_list ref_list;
@@ -254,7 +254,7 @@ struct GTY(()) cgraph_clone_info
/* The cgraph data structure.
Each function decl has assigned cgraph_node listing callees and callers. */
-struct GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node_base {
+struct GTY((tag ("SYMTAB_FUNCTION"))) cgraph_node : public symtab_node {
public:
struct cgraph_edge *callees;
struct cgraph_edge *callers;
@@ -514,7 +514,7 @@ typedef struct cgraph_edge *cgraph_edge_p;
/* The varpool data structure.
Each static variable decl has assigned varpool_node. */
-class GTY((tag ("SYMTAB_VARIABLE"))) varpool_node : public symtab_node_base {
+class GTY((tag ("SYMTAB_VARIABLE"))) varpool_node : public symtab_node {
public:
/* Set when variable is scheduled to be assembled. */
unsigned output : 1;
@@ -536,7 +536,7 @@ struct GTY(()) asm_node {
template <>
template <>
inline bool
-is_a_helper <cgraph_node>::test (symtab_node_base *p)
+is_a_helper <cgraph_node>::test (symtab_node *p)
{
return p->type == SYMTAB_FUNCTION;
}
@@ -546,12 +546,12 @@ is_a_helper <cgraph_node>::test (symtab_node_base *p)
template <>
template <>
inline bool
-is_a_helper <varpool_node>::test (symtab_node_base *p)
+is_a_helper <varpool_node>::test (symtab_node *p)
{
return p->type == SYMTAB_VARIABLE;
}
-extern GTY(()) symtab_node symtab_nodes;
+extern GTY(()) symtab_node *symtab_nodes;
extern GTY(()) int cgraph_n_nodes;
extern GTY(()) int cgraph_max_uid;
extern GTY(()) int cgraph_edge_max_uid;
@@ -582,37 +582,37 @@ extern GTY(()) int symtab_order;
extern bool cpp_implicit_aliases_done;
/* In symtab.c */
-void symtab_register_node (symtab_node);
-void symtab_unregister_node (symtab_node);
-void symtab_remove_node (symtab_node);
-symtab_node symtab_get_node (const_tree);
-symtab_node symtab_node_for_asm (const_tree asmname);
-const char * symtab_node_asm_name (symtab_node);
-const char * symtab_node_name (symtab_node);
-void symtab_insert_node_to_hashtable (symtab_node);
-void symtab_add_to_same_comdat_group (symtab_node, symtab_node);
-void symtab_dissolve_same_comdat_group_list (symtab_node node);
+void symtab_register_node (symtab_node *);
+void symtab_unregister_node (symtab_node *);
+void symtab_remove_node (symtab_node *);
+symtab_node *symtab_get_node (const_tree);
+symtab_node *symtab_node_for_asm (const_tree asmname);
+const char * symtab_node_asm_name (symtab_node *);
+const char * symtab_node_name (symtab_node *);
+void symtab_insert_node_to_hashtable (symtab_node *);
+void symtab_add_to_same_comdat_group (symtab_node *, symtab_node *);
+void symtab_dissolve_same_comdat_group_list (symtab_node *node);
void dump_symtab (FILE *);
void debug_symtab (void);
-void dump_symtab_node (FILE *, symtab_node);
-void debug_symtab_node (symtab_node);
-void dump_symtab_base (FILE *, symtab_node);
+void dump_symtab_node (FILE *, symtab_node *);
+void debug_symtab_node (symtab_node *);
+void dump_symtab_base (FILE *, symtab_node *);
void verify_symtab (void);
-void verify_symtab_node (symtab_node);
-bool verify_symtab_base (symtab_node);
-bool symtab_used_from_object_file_p (symtab_node);
+void verify_symtab_node (symtab_node *);
+bool verify_symtab_base (symtab_node *);
+bool symtab_used_from_object_file_p (symtab_node *);
void symtab_make_decl_local (tree);
-symtab_node symtab_alias_ultimate_target (symtab_node,
+symtab_node *symtab_alias_ultimate_target (symtab_node *,
enum availability *avail = NULL);
-bool symtab_resolve_alias (symtab_node node, symtab_node target);
-void fixup_same_cpp_alias_visibility (symtab_node node, symtab_node target);
-bool symtab_for_node_and_aliases (symtab_node,
- bool (*) (symtab_node, void *),
+bool symtab_resolve_alias (symtab_node *node, symtab_node *target);
+void fixup_same_cpp_alias_visibility (symtab_node *node, symtab_node *target);
+bool symtab_for_node_and_aliases (symtab_node *,
+ bool (*) (symtab_node *, void *),
void *,
bool);
-symtab_node symtab_nonoverwritable_alias (symtab_node);
-enum availability symtab_node_availability (symtab_node);
-bool symtab_semantically_equivalent_p (symtab_node, symtab_node);
+symtab_node *symtab_nonoverwritable_alias (symtab_node *);
+enum availability symtab_node_availability (symtab_node *);
+bool symtab_semantically_equivalent_p (symtab_node *, symtab_node *);
/* In cgraph.c */
void dump_cgraph (FILE *);
@@ -738,7 +738,7 @@ void compile (void);
void init_cgraph (void);
bool cgraph_process_new_functions (void);
void cgraph_process_same_body_aliases (void);
-void fixup_same_cpp_alias_visibility (symtab_node, symtab_node target, tree);
+void fixup_same_cpp_alias_visibility (symtab_node *, symtab_node *target, tree);
/* Initialize datastructures so DECL is a function in lowered gimple form.
IN_SSA is true if the gimple is in SSA. */
basic_block init_lowered_empty_function (tree, bool);
@@ -842,13 +842,13 @@ bool varpool_for_node_and_aliases (struct varpool_node *,
void *, bool);
void varpool_add_new_variable (tree);
void symtab_initialize_asm_name_hash (void);
-void symtab_prevail_in_asm_name_hash (symtab_node node);
+void symtab_prevail_in_asm_name_hash (symtab_node *node);
void varpool_remove_initializer (struct varpool_node *);
/* Return callgraph node for given symbol and check it is a function. */
static inline struct cgraph_node *
-cgraph (symtab_node node)
+cgraph (symtab_node *node)
{
gcc_checking_assert (!node || node->type == SYMTAB_FUNCTION);
return (struct cgraph_node *)node;
@@ -856,7 +856,7 @@ cgraph (symtab_node node)
/* Return varpool node for given symbol and check it is a variable. */
static inline struct varpool_node *
-varpool (symtab_node node)
+varpool (symtab_node *node)
{
gcc_checking_assert (!node || node->type == SYMTAB_VARIABLE);
return (struct varpool_node *)node;
@@ -915,7 +915,7 @@ varpool_node_name (struct varpool_node *node)
static inline struct varpool_node *
varpool_first_variable (void)
{
- symtab_node node;
+ symtab_node *node;
for (node = symtab_nodes; node; node = node->next)
if (varpool_node *vnode = dyn_cast <varpool_node> (node))
return vnode;
@@ -926,7 +926,7 @@ varpool_first_variable (void)
static inline struct varpool_node *
varpool_next_variable (struct varpool_node *node)
{
- symtab_node node1 = node->next;
+ symtab_node *node1 = node->next;
for (; node1; node1 = node1->next)
if (varpool_node *vnode1 = dyn_cast <varpool_node> (node1))
return vnode1;
@@ -942,7 +942,7 @@ varpool_next_variable (struct varpool_node *node)
static inline struct varpool_node *
varpool_first_static_initializer (void)
{
- symtab_node node;
+ symtab_node *node;
for (node = symtab_nodes; node; node = node->next)
{
varpool_node *vnode = dyn_cast <varpool_node> (node);
@@ -956,7 +956,7 @@ varpool_first_static_initializer (void)
static inline struct varpool_node *
varpool_next_static_initializer (struct varpool_node *node)
{
- symtab_node node1 = node->next;
+ symtab_node *node1 = node->next;
for (; node1; node1 = node1->next)
{
varpool_node *vnode1 = dyn_cast <varpool_node> (node1);
@@ -975,7 +975,7 @@ varpool_next_static_initializer (struct varpool_node *node)
static inline struct varpool_node *
varpool_first_defined_variable (void)
{
- symtab_node node;
+ symtab_node *node;
for (node = symtab_nodes; node; node = node->next)
{
varpool_node *vnode = dyn_cast <varpool_node> (node);
@@ -989,7 +989,7 @@ varpool_first_defined_variable (void)
static inline struct varpool_node *
varpool_next_defined_variable (struct varpool_node *node)
{
- symtab_node node1 = node->next;
+ symtab_node *node1 = node->next;
for (; node1; node1 = node1->next)
{
varpool_node *vnode1 = dyn_cast <varpool_node> (node1);
@@ -1007,7 +1007,7 @@ varpool_next_defined_variable (struct varpool_node *node)
static inline struct cgraph_node *
cgraph_first_defined_function (void)
{
- symtab_node node;
+ symtab_node *node;
for (node = symtab_nodes; node; node = node->next)
{
cgraph_node *cn = dyn_cast <cgraph_node> (node);
@@ -1021,7 +1021,7 @@ cgraph_first_defined_function (void)
static inline struct cgraph_node *
cgraph_next_defined_function (struct cgraph_node *node)
{
- symtab_node node1 = node->next;
+ symtab_node *node1 = node->next;
for (; node1; node1 = node1->next)
{
cgraph_node *cn1 = dyn_cast <cgraph_node> (node1);
@@ -1040,7 +1040,7 @@ cgraph_next_defined_function (struct cgraph_node *node)
static inline struct cgraph_node *
cgraph_first_function (void)
{
- symtab_node node;
+ symtab_node *node;
for (node = symtab_nodes; node; node = node->next)
if (cgraph_node *cn = dyn_cast <cgraph_node> (node))
return cn;
@@ -1051,7 +1051,7 @@ cgraph_first_function (void)
static inline struct cgraph_node *
cgraph_next_function (struct cgraph_node *node)
{
- symtab_node node1 = node->next;
+ symtab_node *node1 = node->next;
for (; node1; node1 = node1->next)
if (cgraph_node *cn1 = dyn_cast <cgraph_node> (node1))
return cn1;
@@ -1078,7 +1078,7 @@ cgraph_function_with_gimple_body_p (struct cgraph_node *node)
static inline struct cgraph_node *
cgraph_first_function_with_gimple_body (void)
{
- symtab_node node;
+ symtab_node *node;
for (node = symtab_nodes; node; node = node->next)
{
cgraph_node *cn = dyn_cast <cgraph_node> (node);
@@ -1092,7 +1092,7 @@ cgraph_first_function_with_gimple_body (void)
static inline struct cgraph_node *
cgraph_next_function_with_gimple_body (struct cgraph_node *node)
{
- symtab_node node1 = node->next;
+ symtab_node *node1 = node->next;
for (; node1; node1 = node1->next)
{
cgraph_node *cn1 = dyn_cast <cgraph_node> (node1);
@@ -1291,8 +1291,8 @@ htab_t constant_pool_htab (void);
/* Return node that alias N is aliasing. */
-static inline symtab_node
-symtab_alias_target (symtab_node n)
+static inline symtab_node *
+symtab_alias_target (symtab_node *n)
{
struct ipa_ref *ref;
ipa_ref_list_reference_iterate (&n->ref_list, 0, ref);
@@ -1380,7 +1380,7 @@ cgraph_mark_force_output_node (struct cgraph_node *node)
or abstract function kept for debug info purposes only. */
static inline bool
-symtab_real_symbol_p (symtab_node node)
+symtab_real_symbol_p (symtab_node *node)
{
struct cgraph_node *cnode;
@@ -1397,7 +1397,7 @@ symtab_real_symbol_p (symtab_node node)
/* Return true if NODE can be discarded by linker from the binary. */
static inline bool
-symtab_can_be_discarded (symtab_node node)
+symtab_can_be_discarded (symtab_node *node)
{
return (DECL_EXTERNAL (node->decl)
|| (DECL_ONE_ONLY (node->decl)
diff --git a/gcc/cgraphbuild.c b/gcc/cgraphbuild.c
index 1490cb7aa3e..87e06e37cbe 100644
--- a/gcc/cgraphbuild.c
+++ b/gcc/cgraphbuild.c
@@ -223,7 +223,7 @@ mark_address (gimple stmt, tree addr, void *data)
{
struct cgraph_node *node = cgraph_get_create_real_symbol_node (addr);
cgraph_mark_address_taken_node (node);
- ipa_record_reference ((symtab_node)data,
+ ipa_record_reference ((symtab_node *)data,
node,
IPA_REF_ADDR, stmt);
}
@@ -232,7 +232,7 @@ mark_address (gimple stmt, tree addr, void *data)
{
struct varpool_node *vnode = varpool_node_for_decl (addr);
- ipa_record_reference ((symtab_node)data,
+ ipa_record_reference ((symtab_node *)data,
vnode,
IPA_REF_ADDR, stmt);
}
@@ -252,7 +252,7 @@ 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_real_symbol_node (t);
cgraph_mark_address_taken_node (node);
- ipa_record_reference ((symtab_node)data,
+ ipa_record_reference ((symtab_node *)data,
node,
IPA_REF_ADDR, stmt);
}
@@ -261,7 +261,7 @@ mark_load (gimple stmt, tree t, void *data)
{
struct varpool_node *vnode = varpool_node_for_decl (t);
- ipa_record_reference ((symtab_node)data,
+ ipa_record_reference ((symtab_node *)data,
vnode,
IPA_REF_LOAD, stmt);
}
@@ -279,7 +279,7 @@ mark_store (gimple stmt, tree t, void *data)
{
struct varpool_node *vnode = varpool_node_for_decl (t);
- ipa_record_reference ((symtab_node)data,
+ ipa_record_reference ((symtab_node *)data,
vnode,
IPA_REF_STORE, stmt);
}
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 39fb1427b6c..c3a8967e843 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -225,7 +225,7 @@ static GTY (()) tree vtable_entry_type;
either outside this translation unit, something magic in the system
configury */
bool
-decide_is_symbol_needed (symtab_node node)
+decide_is_symbol_needed (symtab_node *node)
{
tree decl = node->decl;
@@ -263,13 +263,13 @@ decide_is_symbol_needed (symtab_node node)
/* Head of the queue of nodes to be processed while building callgraph */
-static symtab_node first = (symtab_node)(void *)1;
+static symtab_node *first = (symtab_node *)(void *)1;
/* Add NODE to queue starting at FIRST.
The queue is linked via AUX pointers and terminated by pointer to 1. */
static void
-enqueue_node (symtab_node node)
+enqueue_node (symtab_node *node)
{
if (node->aux)
return;
@@ -387,7 +387,7 @@ cgraph_reset_node (struct cgraph_node *node)
/* Return true when there are references to NODE. */
static bool
-referred_to_p (symtab_node node)
+referred_to_p (symtab_node *node)
{
struct ipa_ref *ref;
@@ -671,14 +671,14 @@ analyze_function (struct cgraph_node *node)
void
cgraph_process_same_body_aliases (void)
{
- symtab_node node;
+ symtab_node *node;
FOR_EACH_SYMBOL (node)
if (node->cpp_implicit_alias && !node->analyzed)
symtab_resolve_alias
(node,
TREE_CODE (node->alias_target) == VAR_DECL
- ? (symtab_node)varpool_node_for_decl (node->alias_target)
- : (symtab_node)cgraph_get_create_node (node->alias_target));
+ ? (symtab_node *)varpool_node_for_decl (node->alias_target)
+ : (symtab_node *)cgraph_get_create_node (node->alias_target));
cpp_implicit_aliases_done = true;
}
@@ -920,8 +920,8 @@ analyze_functions (void)
struct varpool_node *first_handled_var = first_analyzed_var;
struct pointer_set_t *reachable_call_targets = pointer_set_create ();
- symtab_node node;
- symtab_node next;
+ symtab_node *node;
+ symtab_node *next;
int i;
struct ipa_ref *ref;
bool changed = true;
@@ -977,11 +977,11 @@ analyze_functions (void)
/* Lower representation, build callgraph edges and references for all trivially
needed symbols and all symbols referred by them. */
- while (first != (symtab_node)(void *)1)
+ while (first != (symtab_node *)(void *)1)
{
changed = true;
node = first;
- first = (symtab_node)first->aux;
+ first = (symtab_node *)first->aux;
cgraph_node *cnode = dyn_cast <cgraph_node> (node);
if (cnode && cnode->definition)
{
@@ -1040,7 +1040,7 @@ analyze_functions (void)
if (node->same_comdat_group)
{
- symtab_node next;
+ symtab_node *next;
for (next = node->same_comdat_group;
next != node;
next = next->same_comdat_group)
@@ -1126,7 +1126,7 @@ handle_alias_pairs (void)
for (i = 0; alias_pairs && alias_pairs->iterate (i, &p);)
{
- symtab_node target_node = symtab_node_for_asm (p->target);
+ symtab_node *target_node = symtab_node_for_asm (p->target);
/* Weakrefs with target not defined in current unit are easy to handle:
they behave just as external variables except we need to note the
@@ -1134,7 +1134,7 @@ handle_alias_pairs (void)
if (!target_node
&& lookup_attribute ("weakref", DECL_ATTRIBUTES (p->decl)) != NULL)
{
- symtab_node node = symtab_get_node (p->decl);
+ symtab_node *node = symtab_get_node (p->decl);
if (node)
{
node->alias_target = p->target;
@@ -1147,7 +1147,7 @@ handle_alias_pairs (void)
else if (!target_node)
{
error ("%q+D aliased to undefined symbol %qE", p->decl, p->target);
- symtab_node node = symtab_get_node (p->decl);
+ symtab_node *node = symtab_get_node (p->decl);
if (node)
node->alias = false;
alias_pairs->unordered_remove (i);
@@ -2049,7 +2049,7 @@ get_alias_symbol (tree decl)
static void
output_weakrefs (void)
{
- symtab_node node;
+ symtab_node *node;
FOR_EACH_SYMBOL (node)
if (node->alias
&& !TREE_ASM_WRITTEN (node->decl)
@@ -2171,7 +2171,7 @@ compile (void)
level by physically rewritting the IL. At the moment we can only redirect
calls, so we need infrastructure for renaming references as well. */
#ifndef ASM_OUTPUT_WEAKREF
- symtab_node node;
+ symtab_node *node;
FOR_EACH_SYMBOL (node)
if (node->alias
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c
index 73b626c7d7b..b4da694b27b 100644
--- a/gcc/gimple-fold.c
+++ b/gcc/gimple-fold.c
@@ -66,7 +66,7 @@ can_refer_decl_in_current_unit_p (tree decl, tree from_decl)
{
struct varpool_node *vnode;
struct cgraph_node *node;
- symtab_node snode;
+ symtab_node *snode;
if (DECL_ABSTRACT (decl))
return false;
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index 83bd47933b9..445872387d8 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -4055,7 +4055,7 @@ inline_write_summary (void)
for (i = 0; i < lto_symtab_encoder_size (encoder); i++)
{
- symtab_node snode = lto_symtab_encoder_deref (encoder, i);
+ symtab_node *snode = lto_symtab_encoder_deref (encoder, i);
cgraph_node *cnode = dyn_cast <cgraph_node> (snode);
if (cnode && cnode->definition && !cnode->alias)
count++;
@@ -4064,7 +4064,7 @@ inline_write_summary (void)
for (i = 0; i < lto_symtab_encoder_size (encoder); i++)
{
- symtab_node snode = lto_symtab_encoder_deref (encoder, i);
+ symtab_node *snode = lto_symtab_encoder_deref (encoder, i);
cgraph_node *cnode = dyn_cast <cgraph_node> (snode);
if (cnode && (node = cnode)->definition && !node->alias)
{
diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c
index 1ceabfabb3f..d9ea5dc08bf 100644
--- a/gcc/ipa-prop.c
+++ b/gcc/ipa-prop.c
@@ -2512,7 +2512,7 @@ ipa_find_agg_cst_for_param (struct ipa_agg_jump_function *agg,
successfully found and removed. */
static bool
-remove_described_reference (symtab_node symbol, struct ipa_cst_ref_desc *rdesc)
+remove_described_reference (symtab_node *symbol, struct ipa_cst_ref_desc *rdesc)
{
struct ipa_ref *to_del;
struct cgraph_edge *origin;
@@ -2577,7 +2577,7 @@ try_decrement_rdesc_refcount (struct ipa_jump_func *jfunc)
&& (rdesc = jfunc_rdesc_usable (jfunc))
&& --rdesc->refcount == 0)
{
- symtab_node symbol = cgraph_node_for_jfunc (jfunc);
+ symtab_node *symbol = cgraph_node_for_jfunc (jfunc);
if (!symbol)
return false;
@@ -3097,7 +3097,7 @@ ipa_edge_duplication_hook (struct cgraph_edge *src, struct cgraph_edge *dst,
else if (src->caller == dst->caller)
{
struct ipa_ref *ref;
- symtab_node n = cgraph_node_for_jfunc (src_jf);
+ symtab_node *n = cgraph_node_for_jfunc (src_jf);
gcc_checking_assert (n);
ref = ipa_find_reference (src->caller, n,
src->call_stmt, src->lto_stmt_uid);
diff --git a/gcc/ipa-ref.c b/gcc/ipa-ref.c
index 4f04614e301..04ce9090dfe 100644
--- a/gcc/ipa-ref.c
+++ b/gcc/ipa-ref.c
@@ -34,8 +34,8 @@ static const char *ipa_ref_use_name[] = {"read","write","addr","alias"};
of the use and STMT the statement (if it exists). */
struct ipa_ref *
-ipa_record_reference (symtab_node referring_node,
- symtab_node referred_node,
+ipa_record_reference (symtab_node *referring_node,
+ symtab_node *referred_node,
enum ipa_ref_use use_type, gimple stmt)
{
struct ipa_ref *ref, *ref2;
@@ -76,7 +76,7 @@ ipa_record_reference (symtab_node referring_node,
reference or NULL if none was created. */
struct ipa_ref *
-ipa_maybe_record_reference (symtab_node referring_node, tree val,
+ipa_maybe_record_reference (symtab_node *referring_node, tree val,
enum ipa_ref_use use_type, gimple stmt)
{
STRIP_NOPS (val);
@@ -86,7 +86,7 @@ ipa_maybe_record_reference (symtab_node referring_node, tree val,
if (val && (TREE_CODE (val) == FUNCTION_DECL
|| TREE_CODE (val) == VAR_DECL))
{
- symtab_node referred = symtab_get_node (val);
+ symtab_node *referred = symtab_get_node (val);
gcc_checking_assert (referred);
return ipa_record_reference (referring_node, referred,
use_type, stmt);
@@ -186,7 +186,7 @@ ipa_dump_referring (FILE * file, struct ipa_ref_list *list)
struct ipa_ref *
ipa_clone_ref (struct ipa_ref *ref,
- symtab_node dest_node,
+ symtab_node *dest_node,
gimple stmt)
{
bool speculative = ref->speculative;
@@ -204,7 +204,7 @@ ipa_clone_ref (struct ipa_ref *ref,
/* Clone all references from SRC to DEST_NODE or DEST_VARPOOL_NODE. */
void
-ipa_clone_references (symtab_node dest_node,
+ipa_clone_references (symtab_node *dest_node,
struct ipa_ref_list *src)
{
struct ipa_ref *ref, *ref2;
@@ -225,7 +225,7 @@ ipa_clone_references (symtab_node dest_node,
/* Clone all referring from SRC to DEST_NODE or DEST_VARPOOL_NODE. */
void
-ipa_clone_referring (symtab_node dest_node,
+ipa_clone_referring (symtab_node *dest_node,
struct ipa_ref_list *src)
{
struct ipa_ref *ref, *ref2;
@@ -268,7 +268,7 @@ ipa_ref_has_aliases_p (struct ipa_ref_list *ref_list)
and associated with statement STMT. */
struct ipa_ref *
-ipa_find_reference (symtab_node referring_node, symtab_node referred_node,
+ipa_find_reference (symtab_node *referring_node, symtab_node *referred_node,
gimple stmt, unsigned int lto_stmt_uid)
{
struct ipa_ref *r = NULL;
@@ -288,7 +288,7 @@ ipa_find_reference (symtab_node referring_node, symtab_node referred_node,
STMT. */
void
-ipa_remove_stmt_references (symtab_node referring_node, gimple stmt)
+ipa_remove_stmt_references (symtab_node *referring_node, gimple stmt)
{
struct ipa_ref *r = NULL;
int i;
@@ -304,7 +304,7 @@ ipa_remove_stmt_references (symtab_node referring_node, gimple stmt)
with callgraph edges associated with them. */
void
-ipa_clear_stmts_in_references (symtab_node referring_node)
+ipa_clear_stmts_in_references (symtab_node *referring_node)
{
struct ipa_ref *r = NULL;
int i;
diff --git a/gcc/ipa-ref.h b/gcc/ipa-ref.h
index d5ea7ee363d..9f392b41588 100644
--- a/gcc/ipa-ref.h
+++ b/gcc/ipa-ref.h
@@ -20,7 +20,7 @@ along with GCC; see the file COPYING3. If not see
struct cgraph_node;
struct varpool_node;
-class symtab_node_base;
+class symtab_node;
/* How the reference is done. */
@@ -35,8 +35,8 @@ enum GTY(()) ipa_ref_use
/* Record of reference in callgraph or varpool. */
struct GTY(()) ipa_ref
{
- symtab_node referring;
- symtab_node referred;
+ symtab_node *referring;
+ symtab_node *referred;
gimple stmt;
unsigned int lto_stmt_uid;
unsigned int referred_index;
@@ -58,10 +58,10 @@ struct GTY(()) ipa_ref_list
vec<ipa_ref_ptr> GTY((skip)) referring;
};
-struct ipa_ref * ipa_record_reference (symtab_node,
- symtab_node,
+struct ipa_ref * ipa_record_reference (symtab_node *,
+ symtab_node *,
enum ipa_ref_use, gimple);
-struct ipa_ref * ipa_maybe_record_reference (symtab_node, tree,
+struct ipa_ref * ipa_maybe_record_reference (symtab_node *, tree,
enum ipa_ref_use, gimple);
void ipa_remove_reference (struct ipa_ref *);
@@ -69,11 +69,11 @@ void ipa_remove_all_references (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_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 *);
-struct ipa_ref * ipa_clone_ref (struct ipa_ref *, symtab_node, gimple);
+void ipa_clone_references (symtab_node *, struct ipa_ref_list *);
+void ipa_clone_referring (symtab_node *, struct ipa_ref_list *);
+struct ipa_ref * ipa_clone_ref (struct ipa_ref *, symtab_node *, gimple);
bool ipa_ref_cannot_lead_to_return (struct ipa_ref *);
bool ipa_ref_has_aliases_p (struct ipa_ref_list *);
-struct ipa_ref * ipa_find_reference (symtab_node, symtab_node, gimple, unsigned int);
-void ipa_remove_stmt_references (symtab_node, gimple);
-void ipa_clear_stmts_in_references (symtab_node);
+struct ipa_ref * ipa_find_reference (symtab_node *, symtab_node *, gimple, unsigned int);
+void ipa_remove_stmt_references (symtab_node *, gimple);
+void ipa_clear_stmts_in_references (symtab_node *);
diff --git a/gcc/ipa-reference.c b/gcc/ipa-reference.c
index 25a6ad4421c..ae8ba3c651f 100644
--- a/gcc/ipa-reference.c
+++ b/gcc/ipa-reference.c
@@ -968,7 +968,7 @@ ipa_reference_write_optimization_summary (void)
/* See what variables we are interested in. */
for (i = 0; i < lto_symtab_encoder_size (encoder); i++)
{
- symtab_node snode = lto_symtab_encoder_deref (encoder, i);
+ symtab_node *snode = lto_symtab_encoder_deref (encoder, i);
varpool_node *vnode = dyn_cast <varpool_node> (snode);
if (vnode
&& bitmap_bit_p (all_module_statics, DECL_UID (vnode->decl))
@@ -986,7 +986,7 @@ ipa_reference_write_optimization_summary (void)
if (ltrans_statics_bitcount)
for (i = 0; i < lto_symtab_encoder_size (encoder); i++)
{
- symtab_node snode = lto_symtab_encoder_deref (encoder, i);
+ symtab_node *snode = lto_symtab_encoder_deref (encoder, i);
cgraph_node *cnode = dyn_cast <cgraph_node> (snode);
if (cnode && write_node_summary_p (cnode, encoder, ltrans_statics))
count++;
@@ -1001,7 +1001,7 @@ ipa_reference_write_optimization_summary (void)
if (ltrans_statics_bitcount)
for (i = 0; i < lto_symtab_encoder_size (encoder); i++)
{
- symtab_node snode = lto_symtab_encoder_deref (encoder, i);
+ symtab_node *snode = lto_symtab_encoder_deref (encoder, i);
cgraph_node *cnode = dyn_cast <cgraph_node> (snode);
if (cnode && write_node_summary_p (cnode, encoder, ltrans_statics))
{
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 9600b48c674..aef437a46f5 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -107,7 +107,7 @@ update_inlined_to_pointer (struct cgraph_node *node, struct cgraph_node *inlined
reachable. */
static void
-enqueue_node (symtab_node node, symtab_node *first,
+enqueue_node (symtab_node *node, symtab_node **first,
struct pointer_set_t *reachable)
{
/* Node is still in queue; do nothing. */
@@ -125,7 +125,7 @@ enqueue_node (symtab_node node, symtab_node *first,
static void
process_references (struct ipa_ref_list *list,
- symtab_node *first,
+ symtab_node **first,
bool before_inlining_p,
struct pointer_set_t *reachable)
{
@@ -133,7 +133,7 @@ process_references (struct ipa_ref_list *list,
struct ipa_ref *ref;
for (i = 0; ipa_ref_list_reference_iterate (list, i, ref); i++)
{
- symtab_node node = ref->referred;
+ symtab_node *node = ref->referred;
if (node->definition && !node->in_other_partition
&& ((!DECL_EXTERNAL (node->decl) || node->alias)
@@ -161,7 +161,7 @@ process_references (struct ipa_ref_list *list,
static void
walk_polymorphic_call_targets (pointer_set_t *reachable_call_targets,
struct cgraph_edge *edge,
- symtab_node *first,
+ symtab_node **first,
pointer_set_t *reachable, bool before_inlining_p)
{
unsigned int i;
@@ -287,7 +287,7 @@ walk_polymorphic_call_targets (pointer_set_t *reachable_call_targets,
bool
symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
{
- symtab_node first = (symtab_node) (void *) 1;
+ symtab_node *first = (symtab_node *) (void *) 1;
struct cgraph_node *node, *next;
struct varpool_node *vnode, *vnext;
bool changed = false;
@@ -339,12 +339,12 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
}
/* Perform reachability analysis. */
- while (first != (symtab_node) (void *) 1)
+ while (first != (symtab_node *) (void *) 1)
{
bool in_boundary_p = !pointer_set_contains (reachable, first);
- symtab_node node = first;
+ symtab_node *node = first;
- first = (symtab_node)first->aux;
+ first = (symtab_node *)first->aux;
/* If we are processing symbol in boundary, mark its AUX pointer for
possible later re-processing in enqueue_node. */
@@ -363,7 +363,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
all other in the same comdat group to be also reachable. */
if (node->same_comdat_group)
{
- symtab_node next;
+ symtab_node *next;
for (next = node->same_comdat_group;
next != node;
next = next->same_comdat_group)
@@ -640,7 +640,7 @@ ipa_discover_readonly_nonaddressable_vars (void)
/* Return true when there is a reference to node and it is not vtable. */
static bool
-address_taken_from_non_vtable_p (symtab_node node)
+address_taken_from_non_vtable_p (symtab_node *node)
{
int i;
struct ipa_ref *ref;
@@ -661,7 +661,7 @@ address_taken_from_non_vtable_p (symtab_node node)
/* A helper for comdat_can_be_unshared_p. */
static bool
-comdat_can_be_unshared_p_1 (symtab_node node)
+comdat_can_be_unshared_p_1 (symtab_node *node)
{
/* When address is taken, we don't know if equality comparison won't
break eventually. Exception are virutal functions, C++
@@ -704,13 +704,13 @@ comdat_can_be_unshared_p_1 (symtab_node node)
but in C++ there is no way to compare their addresses for equality. */
static bool
-comdat_can_be_unshared_p (symtab_node node)
+comdat_can_be_unshared_p (symtab_node *node)
{
if (!comdat_can_be_unshared_p_1 (node))
return false;
if (node->same_comdat_group)
{
- symtab_node next;
+ symtab_node *next;
/* If more than one function is in the same COMDAT group, it must
be shared even if just one function in the comdat group has
@@ -859,7 +859,7 @@ varpool_externally_visible_p (struct varpool_node *vnode)
*/
bool
-can_replace_by_local_alias (symtab_node node)
+can_replace_by_local_alias (symtab_node *node)
{
return (symtab_node_availability (node) > AVAIL_OVERWRITABLE
&& !symtab_can_be_discarded (node));
@@ -919,7 +919,7 @@ function_and_variable_visibility (bool whole_program)
if (node->same_comdat_group && DECL_EXTERNAL (node->decl))
{
#ifdef ENABLE_CHECKING
- symtab_node n;
+ symtab_node *n;
for (n = node->same_comdat_group;
n != node;
diff --git a/gcc/is-a.h b/gcc/is-a.h
index 15540e40d8e..c47d10f20f4 100644
--- a/gcc/is-a.h
+++ b/gcc/is-a.h
@@ -31,7 +31,7 @@ bool is_a <TYPE> (pointer)
Tests whether the pointer actually points to a more derived TYPE.
- Suppose you have a symtab_node_base *ptr, AKA symtab_node ptr. You can test
+ Suppose you have a symtab_node *ptr, AKA symtab_node *ptr. You can test
whether it points to a 'derived' cgraph_node as follows.
if (is_a <cgraph_node> (ptr))
@@ -110,7 +110,7 @@ example,
template <>
template <>
inline bool
- is_a_helper <cgraph_node>::test (symtab_node_base *p)
+ is_a_helper <cgraph_node>::test (symtab_node *p)
{
return p->type == SYMTAB_FUNCTION;
}
@@ -122,7 +122,7 @@ when needed may result in a crash. For example,
template <>
template <>
inline bool
- is_a_helper <cgraph_node>::cast (symtab_node_base *p)
+ is_a_helper <cgraph_node>::cast (symtab_node *p)
{
return &p->x_function;
}
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index 46797fd4ed9..6a52da8a662 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -52,7 +52,7 @@ along with GCC; see the file COPYING3. If not see
#include "ipa-utils.h"
static void output_cgraph_opt_summary (void);
-static void input_cgraph_opt_summary (vec<symtab_node> nodes);
+static void input_cgraph_opt_summary (vec<symtab_node *> nodes);
/* Number of LDPR values known to GCC. */
#define LDPR_NUM_KNOWN (LDPR_PREVAILING_DEF_IRONLY_EXP + 1)
@@ -111,7 +111,7 @@ lto_symtab_encoder_delete (lto_symtab_encoder_t encoder)
int
lto_symtab_encoder_encode (lto_symtab_encoder_t encoder,
- symtab_node node)
+ symtab_node *node)
{
int ref;
void **slot;
@@ -145,7 +145,7 @@ lto_symtab_encoder_encode (lto_symtab_encoder_t encoder,
bool
lto_symtab_encoder_delete_node (lto_symtab_encoder_t encoder,
- symtab_node node)
+ symtab_node *node)
{
void **slot, **last_slot;
int index;
@@ -224,7 +224,7 @@ lto_set_symtab_encoder_encode_initializer (lto_symtab_encoder_t encoder,
bool
lto_symtab_encoder_in_partition_p (lto_symtab_encoder_t encoder,
- symtab_node node)
+ symtab_node *node)
{
int index = lto_symtab_encoder_lookup (encoder, node);
if (index == LCC_NOT_FOUND)
@@ -236,7 +236,7 @@ lto_symtab_encoder_in_partition_p (lto_symtab_encoder_t encoder,
void
lto_set_symtab_encoder_in_partition (lto_symtab_encoder_t encoder,
- symtab_node node)
+ symtab_node *node)
{
int index = lto_symtab_encoder_encode (encoder, node);
encoder->nodes[index].in_partition = true;
@@ -703,7 +703,7 @@ output_refs (lto_symtab_encoder_t encoder)
for (lsei = lsei_start_in_partition (encoder); !lsei_end_p (lsei);
lsei_next_in_partition (&lsei))
{
- symtab_node node = lsei_node (lsei);
+ symtab_node *node = lsei_node (lsei);
count = ipa_ref_list_nreferences (&node->ref_list);
if (count)
@@ -810,7 +810,7 @@ compute_ltrans_boundary (lto_symtab_encoder_t in_encoder)
pickle those too. */
for (i = 0; i < lto_symtab_encoder_size (encoder); i++)
{
- symtab_node node = lto_symtab_encoder_deref (encoder, i);
+ symtab_node *node = lto_symtab_encoder_deref (encoder, i);
if (varpool_node *vnode = dyn_cast <varpool_node> (node))
{
if (!lto_symtab_encoder_encode_initializer_p (encoder,
@@ -905,7 +905,7 @@ output_symtab (void)
n_nodes = lto_symtab_encoder_size (encoder);
for (i = 0; i < n_nodes; i++)
{
- symtab_node node = lto_symtab_encoder_deref (encoder, i);
+ symtab_node *node = lto_symtab_encoder_deref (encoder, i);
if (cgraph_node *cnode = dyn_cast <cgraph_node> (node))
lto_output_node (ob, cnode, encoder);
else
@@ -1011,7 +1011,7 @@ static struct cgraph_node *
input_node (struct lto_file_decl_data *file_data,
struct lto_input_block *ib,
enum LTO_symtab_tags tag,
- vec<symtab_node> nodes)
+ vec<symtab_node *> nodes)
{
gcc::pass_manager *passes = g->get_passes ();
tree fn_decl;
@@ -1084,7 +1084,7 @@ input_node (struct lto_file_decl_data *file_data,
node->global.inlined_to = (cgraph_node_ptr) (intptr_t) ref;
/* Store a reference for now, and fix up later to be a pointer. */
- node->same_comdat_group = (symtab_node) (intptr_t) ref2;
+ node->same_comdat_group = (symtab_node *) (intptr_t) ref2;
if (node->thunk.thunk_p)
{
@@ -1153,7 +1153,7 @@ input_varpool_node (struct lto_file_decl_data *file_data,
node->alias_target = get_alias_symbol (node->decl);
ref = streamer_read_hwi (ib);
/* Store a reference for now, and fix up later to be a pointer. */
- node->same_comdat_group = (symtab_node) (intptr_t) ref;
+ node->same_comdat_group = (symtab_node *) (intptr_t) ref;
node->resolution = streamer_read_enum (ib, ld_plugin_symbol_resolution,
LDPR_NUM_KNOWN);
@@ -1165,10 +1165,10 @@ input_varpool_node (struct lto_file_decl_data *file_data,
static void
input_ref (struct lto_input_block *ib,
- symtab_node referring_node,
- vec<symtab_node> nodes)
+ symtab_node *referring_node,
+ vec<symtab_node *> nodes)
{
- symtab_node node = NULL;
+ symtab_node *node = NULL;
struct bitpack_d bp;
enum ipa_ref_use use;
bool speculative;
@@ -1190,7 +1190,7 @@ input_ref (struct lto_input_block *ib,
indirect_unknown_callee set). */
static void
-input_edge (struct lto_input_block *ib, vec<symtab_node> nodes,
+input_edge (struct lto_input_block *ib, vec<symtab_node *> nodes,
bool indirect)
{
struct cgraph_node *caller, *callee;
@@ -1257,13 +1257,13 @@ input_edge (struct lto_input_block *ib, vec<symtab_node> nodes,
/* Read a cgraph from IB using the info in FILE_DATA. */
-static vec<symtab_node>
+static vec<symtab_node *>
input_cgraph_1 (struct lto_file_decl_data *file_data,
struct lto_input_block *ib)
{
enum LTO_symtab_tags tag;
- vec<symtab_node> nodes = vNULL;
- symtab_node node;
+ vec<symtab_node *> nodes = vNULL;
+ symtab_node *node;
unsigned i;
tag = streamer_read_enum (ib, LTO_symtab_tags, LTO_symtab_last_tag);
@@ -1335,13 +1335,13 @@ input_cgraph_1 (struct lto_file_decl_data *file_data,
static void
input_refs (struct lto_input_block *ib,
- vec<symtab_node> nodes)
+ vec<symtab_node *> nodes)
{
int count;
int idx;
while (true)
{
- symtab_node node;
+ symtab_node *node;
count = streamer_read_uhwi (ib);
if (!count)
break;
@@ -1545,7 +1545,7 @@ input_symtab (void)
const char *data;
size_t len;
struct lto_input_block *ib;
- vec<symtab_node> nodes;
+ vec<symtab_node *> nodes;
ib = lto_create_simple_input_block (file_data, LTO_section_symtab_nodes,
&data, &len);
@@ -1676,7 +1676,7 @@ output_cgraph_opt_summary (void)
n_nodes = lto_symtab_encoder_size (encoder);
for (i = 0; i < n_nodes; i++)
{
- symtab_node node = lto_symtab_encoder_deref (encoder, i);
+ symtab_node *node = lto_symtab_encoder_deref (encoder, i);
cgraph_node *cnode = dyn_cast <cgraph_node> (node);
if (cnode && output_cgraph_opt_summary_p (cnode))
count++;
@@ -1684,7 +1684,7 @@ output_cgraph_opt_summary (void)
streamer_write_uhwi (ob, count);
for (i = 0; i < n_nodes; i++)
{
- symtab_node node = lto_symtab_encoder_deref (encoder, i);
+ symtab_node *node = lto_symtab_encoder_deref (encoder, i);
cgraph_node *cnode = dyn_cast <cgraph_node> (node);
if (cnode && output_cgraph_opt_summary_p (cnode))
{
@@ -1757,7 +1757,7 @@ input_node_opt_summary (struct cgraph_node *node,
static void
input_cgraph_opt_section (struct lto_file_decl_data *file_data,
const char *data, size_t len,
- vec<symtab_node> nodes)
+ vec<symtab_node *> nodes)
{
const struct lto_function_header *header =
(const struct lto_function_header *) data;
@@ -1791,7 +1791,7 @@ input_cgraph_opt_section (struct lto_file_decl_data *file_data,
/* Input optimization summary of cgraph. */
static void
-input_cgraph_opt_summary (vec<symtab_node> nodes)
+input_cgraph_opt_summary (vec<symtab_node *> nodes)
{
struct lto_file_decl_data **file_data_vec = lto_get_file_decl_data ();
struct lto_file_decl_data *file_data;
diff --git a/gcc/lto-section-in.c b/gcc/lto-section-in.c
index adc266f2c63..e4f0aedfa0f 100644
--- a/gcc/lto-section-in.c
+++ b/gcc/lto-section-in.c
@@ -428,7 +428,7 @@ lto_free_function_in_decl_state (struct lto_in_decl_state *state)
release trees needed by the NODE's body. */
void
-lto_free_function_in_decl_state_for_node (symtab_node node)
+lto_free_function_in_decl_state_for_node (symtab_node *node)
{
struct lto_in_decl_state temp;
void **slot;
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index cbbd40a931c..55186234d8c 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -1982,7 +1982,7 @@ lto_output (void)
/* Process only the functions with bodies. */
for (i = 0; i < n_nodes; i++)
{
- symtab_node snode = lto_symtab_encoder_deref (encoder, i);
+ symtab_node *snode = lto_symtab_encoder_deref (encoder, i);
cgraph_node *node = dyn_cast <cgraph_node> (snode);
if (node
&& lto_symtab_encoder_encode_body_p (encoder, node)
@@ -2290,7 +2290,7 @@ write_symbol (struct streamer_tree_cache_d *cache,
/* Return true if NODE should appear in the plugin symbol table. */
bool
-output_symbol_p (symtab_node node)
+output_symbol_p (symtab_node *node)
{
struct cgraph_node *cnode;
if (!symtab_real_symbol_p (node))
@@ -2352,7 +2352,7 @@ produce_symtab (struct output_block *ob)
for (lsei = lsei_start (encoder);
!lsei_end_p (lsei); lsei_next (&lsei))
{
- symtab_node node = lsei_node (lsei);
+ symtab_node *node = lsei_node (lsei);
if (!output_symbol_p (node) || DECL_EXTERNAL (node->decl))
continue;
@@ -2361,7 +2361,7 @@ produce_symtab (struct output_block *ob)
for (lsei = lsei_start (encoder);
!lsei_end_p (lsei); lsei_next (&lsei))
{
- symtab_node node = lsei_node (lsei);
+ symtab_node *node = lsei_node (lsei);
if (!output_symbol_p (node) || !DECL_EXTERNAL (node->decl))
continue;
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h
index 86616d931bf..797e92e335b 100644
--- a/gcc/lto-streamer.h
+++ b/gcc/lto-streamer.h
@@ -430,7 +430,7 @@ struct lto_stats_d
/* Entry of LTO symtab encoder. */
typedef struct
{
- symtab_node node;
+ symtab_node *node;
/* Is the node in this partition (i.e. ltrans of this partition will
be responsible for outputting it)? */
unsigned int in_partition:1;
@@ -773,7 +773,7 @@ extern int lto_eq_in_decl_state (const void *, const void *);
extern struct lto_in_decl_state *lto_get_function_in_decl_state (
struct lto_file_decl_data *, tree);
extern void lto_free_function_in_decl_state (struct lto_in_decl_state *);
-extern void lto_free_function_in_decl_state_for_node (symtab_node);
+extern void lto_free_function_in_decl_state_for_node (symtab_node *);
extern void lto_section_overrun (struct lto_input_block *) ATTRIBUTE_NORETURN;
extern void lto_value_range_error (const char *,
HOST_WIDE_INT, HOST_WIDE_INT,
@@ -872,15 +872,15 @@ void lto_output_location (struct output_block *, struct bitpack_d *, location_t)
/* In lto-cgraph.c */
lto_symtab_encoder_t lto_symtab_encoder_new (bool);
-int lto_symtab_encoder_encode (lto_symtab_encoder_t, symtab_node);
+int lto_symtab_encoder_encode (lto_symtab_encoder_t, symtab_node *);
void lto_symtab_encoder_delete (lto_symtab_encoder_t);
-bool lto_symtab_encoder_delete_node (lto_symtab_encoder_t, symtab_node);
+bool lto_symtab_encoder_delete_node (lto_symtab_encoder_t, symtab_node *);
bool lto_symtab_encoder_encode_body_p (lto_symtab_encoder_t,
struct cgraph_node *);
bool lto_symtab_encoder_in_partition_p (lto_symtab_encoder_t,
- symtab_node);
+ symtab_node *);
void lto_set_symtab_encoder_in_partition (lto_symtab_encoder_t,
- symtab_node);
+ symtab_node *);
bool lto_symtab_encoder_encode_initializer_p (lto_symtab_encoder_t,
struct varpool_node *);
@@ -1043,7 +1043,7 @@ lto_symtab_encoder_size (lto_symtab_encoder_t encoder)
static inline int
lto_symtab_encoder_lookup (lto_symtab_encoder_t encoder,
- symtab_node node)
+ symtab_node *node)
{
void **slot = pointer_map_contains (encoder->map, node);
return (slot && *slot ? (size_t) *(slot) - 1 : LCC_NOT_FOUND);
@@ -1064,7 +1064,7 @@ lsei_next (lto_symtab_encoder_iterator *lsei)
}
/* Return the node pointed to by LSI. */
-static inline symtab_node
+static inline symtab_node *
lsei_node (lto_symtab_encoder_iterator lsei)
{
return lsei.encoder->nodes[lsei.index].node;
@@ -1086,7 +1086,7 @@ lsei_varpool_node (lto_symtab_encoder_iterator lsei)
/* Return the cgraph node corresponding to REF using ENCODER. */
-static inline symtab_node
+static inline symtab_node *
lto_symtab_encoder_deref (lto_symtab_encoder_t encoder, int ref)
{
if (ref == LCC_NOT_FOUND)
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index ebdd442ceb3..b3bed0b3921 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,42 @@
+2013-10-31 David Malcolm <dmalcolm@redhat.com>
+
+ Automated part of renaming of symtab_node_base to symtab_node.
+
+ Patch autogenerated by rename_symtab.py from
+ https://github.com/davidmalcolm/gcc-refactoring-scripts
+ revision 58bb219cc090b2f4516a9297d868c245495ee622
+
+ * lto-partition.c (add_symbol_to_partition): Rename
+ symtab_node_base to symtab_node.
+ (get_symbol_class): Likewise.
+ (symbol_partitioned_p): Likewise.
+ (add_references_to_partition): Likewise.
+ (add_symbol_to_partition_1): Likewise.
+ (contained_in_symbol): Likewise.
+ (add_symbol_to_partition): Likewise.
+ (lto_1_to_1_map): Likewise.
+ (lto_max_map): Likewise.
+ (lto_balanced_map): Likewise.
+ (privatize_symbol_name): Likewise.
+ (promote_symbol): Likewise.
+ (may_need_named_section_p): Likewise.
+ (rename_statics): Likewise.
+ (lto_promote_statics_nonwpa): Likewise.
+ * lto-symtab.c (lto_symtab_merge): Likewise.
+ (lto_symtab_resolve_replaceable_p): Likewise.
+ (lto_symtab_symbol_p): Likewise.
+ (lto_symtab_resolve_can_prevail_p): Likewise.
+ (lto_symtab_resolve_symbols): Likewise.
+ (lto_symtab_merge_decls_2): Likewise.
+ (lto_symtab_merge_decls_1): Likewise.
+ (lto_symtab_merge_decls): Likewise.
+ (lto_symtab_merge_symbols_1): Likewise.
+ (lto_symtab_merge_symbols): Likewise.
+ (lto_symtab_prevailing_decl): Likewise.
+ * lto.c (lto_wpa_write_files): Likewise.
+ (read_cgraph_and_symbols): Likewise.
+ (do_whole_program_analysis): Likewise.
+
2013-10-30 David Malcolm <dmalcolm@redhat.com>
* lto-symtab.c (lto_symtab_merge_decls_2): Split symtab_node
diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c
index 4abeb117fa0..6a3d881acca 100644
--- a/gcc/lto/lto-partition.c
+++ b/gcc/lto/lto-partition.c
@@ -47,12 +47,12 @@ enum symbol_class
vec<ltrans_partition> ltrans_partitions;
-static void add_symbol_to_partition (ltrans_partition part, symtab_node node);
+static void add_symbol_to_partition (ltrans_partition part, symtab_node *node);
/* Classify symbol NODE. */
enum symbol_class
-get_symbol_class (symtab_node node)
+get_symbol_class (symtab_node *node)
{
/* Inline clones are always duplicated.
This include external delcarations. */
@@ -131,14 +131,14 @@ free_ltrans_partitions (void)
/* Return true if symbol is already in some partition. */
static inline bool
-symbol_partitioned_p (symtab_node node)
+symbol_partitioned_p (symtab_node *node)
{
return node->aux;
}
/* Add references into the partition. */
static void
-add_references_to_partition (ltrans_partition part, symtab_node node)
+add_references_to_partition (ltrans_partition part, symtab_node *node)
{
int i;
struct ipa_ref *ref;
@@ -165,12 +165,12 @@ add_references_to_partition (ltrans_partition part, symtab_node node)
of adding NODE to PART. */
static bool
-add_symbol_to_partition_1 (ltrans_partition part, symtab_node node)
+add_symbol_to_partition_1 (ltrans_partition part, symtab_node *node)
{
enum symbol_class c = get_symbol_class (node);
int i;
struct ipa_ref *ref;
- symtab_node node1;
+ symtab_node *node1;
/* If NODE is already there, we have nothing to do. */
if (lto_symtab_encoder_in_partition_p (part->encoder, node))
@@ -241,8 +241,8 @@ add_symbol_to_partition_1 (ltrans_partition part, symtab_node node)
internal label, thunk, alias or so), return the outer symbol.
When add_symbol_to_partition_1 is called on the outer symbol it must
eventually add NODE, too. */
-static symtab_node
-contained_in_symbol (symtab_node node)
+static symtab_node *
+contained_in_symbol (symtab_node *node)
{
/* Weakrefs are never contained in anything. */
if (node->weakref)
@@ -263,9 +263,9 @@ contained_in_symbol (symtab_node node)
of other symbol definition, add the other symbol, too. */
static void
-add_symbol_to_partition (ltrans_partition part, symtab_node node)
+add_symbol_to_partition (ltrans_partition part, symtab_node *node)
{
- symtab_node node1;
+ symtab_node *node1;
/* Verify that we do not try to duplicate something that can not be. */
gcc_checking_assert (get_symbol_class (node) == SYMBOL_DUPLICATE
@@ -294,7 +294,7 @@ undo_partition (ltrans_partition partition, unsigned int n_nodes)
{
while (lto_symtab_encoder_size (partition->encoder) > (int)n_nodes)
{
- symtab_node node = lto_symtab_encoder_deref (partition->encoder,
+ symtab_node *node = lto_symtab_encoder_deref (partition->encoder,
n_nodes);
/* After UNDO we no longer know what was visited. */
@@ -315,7 +315,7 @@ undo_partition (ltrans_partition partition, unsigned int n_nodes)
void
lto_1_to_1_map (void)
{
- symtab_node node;
+ symtab_node *node;
struct lto_file_decl_data *file_data;
struct pointer_map_t *pmap;
ltrans_partition partition;
@@ -372,7 +372,7 @@ lto_1_to_1_map (void)
void
lto_max_map (void)
{
- symtab_node node;
+ symtab_node *node;
ltrans_partition partition;
int npartitions = 0;
@@ -545,7 +545,7 @@ lto_balanced_map (void)
struct ipa_ref_list *refs;
int j;
struct ipa_ref *ref;
- symtab_node snode = lto_symtab_encoder_deref (partition->encoder,
+ symtab_node *snode = lto_symtab_encoder_deref (partition->encoder,
last_visited_node);
if (cgraph_node *node = dyn_cast <cgraph_node> (snode))
@@ -763,7 +763,7 @@ lto_balanced_map (void)
*/
static bool
-privatize_symbol_name (symtab_node node)
+privatize_symbol_name (symtab_node *node)
{
tree decl = node->decl;
const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
@@ -806,7 +806,7 @@ privatize_symbol_name (symtab_node node)
/* Promote variable VNODE to be static. */
static void
-promote_symbol (symtab_node node)
+promote_symbol (symtab_node *node)
{
/* We already promoted ... */
if (DECL_VISIBILITY (node->decl) == VISIBILITY_HIDDEN
@@ -832,7 +832,7 @@ promote_symbol (symtab_node node)
FIXME: we should really not use named sections for inline clones and master clones. */
static bool
-may_need_named_section_p (lto_symtab_encoder_t encoder, symtab_node node)
+may_need_named_section_p (lto_symtab_encoder_t encoder, symtab_node *node)
{
struct cgraph_node *cnode = dyn_cast <cgraph_node> (node);
if (!cnode)
@@ -852,10 +852,10 @@ may_need_named_section_p (lto_symtab_encoder_t encoder, symtab_node node)
asm statemnets referring to them by symbol name. */
static void
-rename_statics (lto_symtab_encoder_t encoder, symtab_node node)
+rename_statics (lto_symtab_encoder_t encoder, symtab_node *node)
{
tree decl = node->decl;
- symtab_node s;
+ symtab_node *s;
tree name = DECL_ASSEMBLER_NAME (decl);
/* See if this is static symbol. */
@@ -935,7 +935,7 @@ lto_promote_cross_file_statics (void)
for (lsei = lsei_start (encoder); !lsei_end_p (lsei);
lsei_next (&lsei))
{
- symtab_node node = lsei_node (lsei);
+ symtab_node *node = lsei_node (lsei);
/* If symbol is static, rename it if its assembler name clash with
anything else in this unit. */
@@ -961,7 +961,7 @@ lto_promote_cross_file_statics (void)
void
lto_promote_statics_nonwpa (void)
{
- symtab_node node;
+ symtab_node *node;
FOR_EACH_SYMBOL (node)
rename_statics (NULL, node);
}
diff --git a/gcc/lto/lto-symtab.c b/gcc/lto/lto-symtab.c
index ec42a930b7f..ced6cf97908 100644
--- a/gcc/lto/lto-symtab.c
+++ b/gcc/lto/lto-symtab.c
@@ -113,7 +113,7 @@ lto_varpool_replace_node (struct varpool_node *vnode,
should be emitted. */
static bool
-lto_symtab_merge (symtab_node prevailing, symtab_node entry)
+lto_symtab_merge (symtab_node *prevailing, symtab_node *entry)
{
tree prevailing_decl = prevailing->decl;
tree decl = entry->decl;
@@ -216,7 +216,7 @@ lto_symtab_merge (symtab_node prevailing, symtab_node entry)
entry. */
static bool
-lto_symtab_resolve_replaceable_p (symtab_node e)
+lto_symtab_resolve_replaceable_p (symtab_node *e)
{
if (DECL_EXTERNAL (e->decl)
|| DECL_COMDAT (e->decl)
@@ -236,7 +236,7 @@ lto_symtab_resolve_replaceable_p (symtab_node e)
handle renaming of static later in partitioning). */
static bool
-lto_symtab_symbol_p (symtab_node e)
+lto_symtab_symbol_p (symtab_node *e)
{
if (!TREE_PUBLIC (e->decl) && !DECL_EXTERNAL (e->decl))
return false;
@@ -246,7 +246,7 @@ lto_symtab_symbol_p (symtab_node e)
/* Return true if the symtab entry E can be the prevailing one. */
static bool
-lto_symtab_resolve_can_prevail_p (symtab_node e)
+lto_symtab_resolve_can_prevail_p (symtab_node *e)
{
if (!lto_symtab_symbol_p (e))
return false;
@@ -263,11 +263,11 @@ lto_symtab_resolve_can_prevail_p (symtab_node e)
/* Resolve the symbol with the candidates in the chain *SLOT and store
their resolutions. */
-static symtab_node
-lto_symtab_resolve_symbols (symtab_node first)
+static symtab_node *
+lto_symtab_resolve_symbols (symtab_node *first)
{
- symtab_node e;
- symtab_node prevailing = NULL;
+ symtab_node *e;
+ symtab_node *prevailing = NULL;
/* Always set e->node so that edges are updated to reflect decl merging. */
for (e = first; e; e = e->next_sharing_asm_name)
@@ -359,10 +359,10 @@ lto_symtab_resolve_symbols (symtab_node first)
do not issue further diagnostics.*/
static void
-lto_symtab_merge_decls_2 (symtab_node first, bool diagnosed_p)
+lto_symtab_merge_decls_2 (symtab_node *first, bool diagnosed_p)
{
- symtab_node prevailing;
- symtab_node e;
+ symtab_node *prevailing;
+ symtab_node *e;
vec<tree> mismatches = vNULL;
unsigned i;
tree decl;
@@ -412,10 +412,10 @@ lto_symtab_merge_decls_2 (symtab_node first, bool diagnosed_p)
/* Helper to process the decl chain for the symbol table entry *SLOT. */
static void
-lto_symtab_merge_decls_1 (symtab_node first)
+lto_symtab_merge_decls_1 (symtab_node *first)
{
- symtab_node e;
- symtab_node prevailing;
+ symtab_node *e;
+ symtab_node *prevailing;
bool diagnosed_p = false;
if (cgraph_dump_file)
@@ -522,7 +522,7 @@ lto_symtab_merge_decls_1 (symtab_node first)
void
lto_symtab_merge_decls (void)
{
- symtab_node node;
+ symtab_node *node;
/* Populate assembler name hash. */
symtab_initialize_asm_name_hash ();
@@ -536,10 +536,10 @@ lto_symtab_merge_decls (void)
/* Helper to process the decl chain for the symbol table entry *SLOT. */
static void
-lto_symtab_merge_symbols_1 (symtab_node prevailing)
+lto_symtab_merge_symbols_1 (symtab_node *prevailing)
{
- symtab_node e;
- symtab_node next;
+ symtab_node *e;
+ symtab_node *next;
/* Replace the cgraph node of each entry with the prevailing one. */
for (e = prevailing->next_sharing_asm_name; e;
@@ -565,7 +565,7 @@ lto_symtab_merge_symbols_1 (symtab_node prevailing)
void
lto_symtab_merge_symbols (void)
{
- symtab_node node;
+ symtab_node *node;
if (!flag_ltrans)
{
@@ -587,11 +587,11 @@ lto_symtab_merge_symbols (void)
{
cgraph_node *cnode, *cnode2;
varpool_node *vnode;
- symtab_node node2;
+ symtab_node *node2;
if (!node->analyzed && node->alias_target)
{
- symtab_node tgt = symtab_node_for_asm (node->alias_target);
+ symtab_node *tgt = symtab_node_for_asm (node->alias_target);
gcc_assert (node->weakref);
if (tgt)
symtab_resolve_alias (node, tgt);
@@ -639,7 +639,7 @@ lto_symtab_merge_symbols (void)
tree
lto_symtab_prevailing_decl (tree decl)
{
- symtab_node ret;
+ symtab_node *ret;
/* Builtins and local symbols are their own prevailing decl. */
if ((!TREE_PUBLIC (decl) && !DECL_EXTERNAL (decl)) || is_builtin_fn (decl))
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
index 89de69dea6f..62856d085b7 100644
--- a/gcc/lto/lto.c
+++ b/gcc/lto/lto.c
@@ -2479,14 +2479,14 @@ lto_wpa_write_files (void)
for (lsei = lsei_start_in_partition (part->encoder); !lsei_end_p (lsei);
lsei_next_in_partition (&lsei))
{
- symtab_node node = lsei_node (lsei);
+ symtab_node *node = lsei_node (lsei);
fprintf (cgraph_dump_file, "%s ", symtab_node_asm_name (node));
}
fprintf (cgraph_dump_file, "\n Symbols in boundary: ");
for (lsei = lsei_start (part->encoder); !lsei_end_p (lsei);
lsei_next (&lsei))
{
- symtab_node node = lsei_node (lsei);
+ symtab_node *node = lsei_node (lsei);
if (!lto_symtab_encoder_in_partition_p (part->encoder, node))
{
fprintf (cgraph_dump_file, "%s ", symtab_node_asm_name (node));
@@ -2750,7 +2750,7 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames)
int count = 0;
struct lto_file_decl_data **decl_data;
void **res;
- symtab_node snode;
+ symtab_node *snode;
init_cgraph ();
@@ -3074,7 +3074,7 @@ print_lto_report_1 (void)
static void
do_whole_program_analysis (void)
{
- symtab_node node;
+ symtab_node *node;
timevar_start (TV_PHASE_OPT_GEN);
diff --git a/gcc/symtab.c b/gcc/symtab.c
index 0bfa4e530a9..90924c31803 100644
--- a/gcc/symtab.c
+++ b/gcc/symtab.c
@@ -49,12 +49,12 @@ const char * const ld_plugin_symbol_resolution_names[]=
};
/* Hash table used to convert declarations into nodes. */
-static GTY((param_is (symtab_node_base))) htab_t symtab_hash;
+static GTY((param_is (symtab_node))) htab_t symtab_hash;
/* Hash table used to convert assembler names into nodes. */
-static GTY((param_is (symtab_node_base))) htab_t assembler_name_hash;
+static GTY((param_is (symtab_node))) htab_t assembler_name_hash;
/* Linked list of symbol table nodes. */
-symtab_node symtab_nodes;
+symtab_node *symtab_nodes;
/* The order index of the next symtab node to be created. This is
used so that we can sort the cgraph nodes in order by when we saw
@@ -66,7 +66,7 @@ int symtab_order;
static hashval_t
hash_node (const void *p)
{
- const_symtab_node n = (const_symtab_node ) p;
+ const symtab_node *n = (const symtab_node *) p;
return (hashval_t) DECL_UID (n->decl);
}
@@ -76,8 +76,8 @@ hash_node (const void *p)
static int
eq_node (const void *p1, const void *p2)
{
- const_symtab_node n1 = (const_symtab_node) p1;
- const_symtab_node n2 = (const_symtab_node) p2;
+ const symtab_node *n1 = (const symtab_node *) p1;
+ const symtab_node *n2 = (const symtab_node *) p2;
return DECL_UID (n1->decl) == DECL_UID (n2->decl);
}
@@ -86,7 +86,7 @@ eq_node (const void *p1, const void *p2)
static hashval_t
hash_node_by_assembler_name (const void *p)
{
- const_symtab_node n = (const_symtab_node) p;
+ const symtab_node *n = (const symtab_node *) p;
return (hashval_t) decl_assembler_name_hash (DECL_ASSEMBLER_NAME (n->decl));
}
@@ -95,7 +95,7 @@ hash_node_by_assembler_name (const void *p)
static int
eq_assembler_name (const void *p1, const void *p2)
{
- const_symtab_node n1 = (const_symtab_node) p1;
+ const symtab_node *n1 = (const symtab_node *) p1;
const_tree name = (const_tree)p2;
return (decl_assembler_name_equal (n1->decl, name));
}
@@ -103,7 +103,7 @@ eq_assembler_name (const void *p1, const void *p2)
/* Insert NODE to assembler name hash. */
static void
-insert_to_assembler_name_hash (symtab_node node, bool with_clones)
+insert_to_assembler_name_hash (symtab_node *node, bool with_clones)
{
if (is_a <varpool_node> (node) && DECL_HARD_REGISTER (node->decl))
return;
@@ -121,9 +121,9 @@ insert_to_assembler_name_hash (symtab_node node, bool with_clones)
decl_assembler_name_hash (name),
INSERT);
gcc_assert (*aslot != node);
- node->next_sharing_asm_name = (symtab_node)*aslot;
+ node->next_sharing_asm_name = (symtab_node *)*aslot;
if (*aslot != NULL)
- ((symtab_node)*aslot)->previous_sharing_asm_name = node;
+ ((symtab_node *)*aslot)->previous_sharing_asm_name = node;
*aslot = node;
/* Update also possible inline clones sharing a decl. */
@@ -139,7 +139,7 @@ insert_to_assembler_name_hash (symtab_node node, bool with_clones)
/* Remove NODE from assembler name hash. */
static void
-unlink_from_assembler_name_hash (symtab_node node, bool with_clones)
+unlink_from_assembler_name_hash (symtab_node *node, bool with_clones)
{
if (assembler_name_hash)
{
@@ -182,7 +182,7 @@ unlink_from_assembler_name_hash (symtab_node node, bool with_clones)
/* Arrange node to be first in its entry of assembler_name_hash. */
void
-symtab_prevail_in_asm_name_hash (symtab_node node)
+symtab_prevail_in_asm_name_hash (symtab_node *node)
{
unlink_from_assembler_name_hash (node, false);
insert_to_assembler_name_hash (node, false);
@@ -193,10 +193,10 @@ symtab_prevail_in_asm_name_hash (symtab_node node)
cgraph/varpool node creation routines. */
void
-symtab_register_node (symtab_node node)
+symtab_register_node (symtab_node *node)
{
- struct symtab_node_base key;
- symtab_node *slot;
+ struct symtab_node key;
+ symtab_node **slot;
node->next = symtab_nodes;
node->previous = NULL;
@@ -207,7 +207,7 @@ symtab_register_node (symtab_node node)
if (!symtab_hash)
symtab_hash = htab_create_ggc (10, hash_node, eq_node, NULL);
key.decl = node->decl;
- slot = (symtab_node *) htab_find_slot (symtab_hash, &key, INSERT);
+ slot = (symtab_node **) htab_find_slot (symtab_hash, &key, INSERT);
if (*slot == NULL)
*slot = node;
@@ -224,15 +224,15 @@ symtab_register_node (symtab_node node)
of inline clones. */
void
-symtab_insert_node_to_hashtable (symtab_node node)
+symtab_insert_node_to_hashtable (symtab_node *node)
{
- struct symtab_node_base key;
- symtab_node *slot;
+ struct symtab_node key;
+ symtab_node **slot;
if (!symtab_hash)
symtab_hash = htab_create_ggc (10, hash_node, eq_node, NULL);
key.decl = node->decl;
- slot = (symtab_node *) htab_find_slot (symtab_hash, &key, INSERT);
+ slot = (symtab_node **) htab_find_slot (symtab_hash, &key, INSERT);
*slot = node;
}
@@ -240,7 +240,7 @@ symtab_insert_node_to_hashtable (symtab_node node)
cgraph/varpool node removal routines. */
void
-symtab_unregister_node (symtab_node node)
+symtab_unregister_node (symtab_node *node)
{
void **slot;
ipa_remove_all_references (&node->ref_list);
@@ -248,7 +248,7 @@ symtab_unregister_node (symtab_node node)
if (node->same_comdat_group)
{
- symtab_node prev;
+ symtab_node *prev;
for (prev = node->same_comdat_group;
prev->same_comdat_group != node;
prev = prev->same_comdat_group)
@@ -276,7 +276,7 @@ symtab_unregister_node (symtab_node node)
gcc_assert ((slot && *slot) || in_lto_p);
if (slot && *slot && *slot == node)
{
- symtab_node replacement_node = NULL;
+ symtab_node *replacement_node = NULL;
if (cgraph_node *cnode = dyn_cast <cgraph_node> (node))
replacement_node = cgraph_find_replacement_node (cnode);
if (!replacement_node)
@@ -291,11 +291,11 @@ symtab_unregister_node (symtab_node node)
/* Return symbol table node associated with DECL, if any,
and NULL otherwise. */
-symtab_node
+symtab_node *
symtab_get_node (const_tree decl)
{
- symtab_node *slot;
- struct symtab_node_base key;
+ symtab_node **slot;
+ struct symtab_node key;
#ifdef ENABLE_CHECKING
/* Check that we are called for sane type of object - functions
@@ -311,7 +311,7 @@ symtab_get_node (const_tree decl)
key.decl = CONST_CAST2 (tree, const_tree, decl);
- slot = (symtab_node *) htab_find_slot (symtab_hash, &key,
+ slot = (symtab_node **) htab_find_slot (symtab_hash, &key,
NO_INSERT);
if (slot)
@@ -322,7 +322,7 @@ symtab_get_node (const_tree decl)
/* Remove symtab NODE from the symbol table. */
void
-symtab_remove_node (symtab_node node)
+symtab_remove_node (symtab_node *node)
{
if (cgraph_node *cnode = dyn_cast <cgraph_node> (node))
cgraph_remove_node (cnode);
@@ -335,7 +335,7 @@ symtab_remove_node (symtab_node node)
void
symtab_initialize_asm_name_hash (void)
{
- symtab_node node;
+ symtab_node *node;
if (!assembler_name_hash)
{
assembler_name_hash =
@@ -349,10 +349,10 @@ symtab_initialize_asm_name_hash (void)
/* Return the cgraph node that has ASMNAME for its DECL_ASSEMBLER_NAME.
Return NULL if there's no such node. */
-symtab_node
+symtab_node *
symtab_node_for_asm (const_tree asmname)
{
- symtab_node node;
+ symtab_node *node;
void **slot;
symtab_initialize_asm_name_hash ();
@@ -362,7 +362,7 @@ symtab_node_for_asm (const_tree asmname)
if (slot)
{
- node = (symtab_node) *slot;
+ node = (symtab_node *) *slot;
return node;
}
return NULL;
@@ -373,7 +373,7 @@ symtab_node_for_asm (const_tree asmname)
void
change_decl_assembler_name (tree decl, tree name)
{
- symtab_node node = NULL;
+ symtab_node *node = NULL;
/* We can have user ASM names on things, like global register variables, that
are not in the symbol table. */
@@ -415,8 +415,8 @@ change_decl_assembler_name (tree decl, tree name)
/* Add NEW_ to the same comdat group that OLD is in. */
void
-symtab_add_to_same_comdat_group (symtab_node new_node,
- symtab_node old_node)
+symtab_add_to_same_comdat_group (symtab_node *new_node,
+ symtab_node *old_node)
{
gcc_assert (DECL_ONE_ONLY (old_node->decl));
gcc_assert (!new_node->same_comdat_group);
@@ -428,7 +428,7 @@ symtab_add_to_same_comdat_group (symtab_node new_node,
old_node->same_comdat_group = new_node;
else
{
- symtab_node n;
+ symtab_node *n;
for (n = old_node->same_comdat_group;
n->same_comdat_group != old_node;
n = n->same_comdat_group)
@@ -440,10 +440,10 @@ symtab_add_to_same_comdat_group (symtab_node new_node,
/* Dissolve the same_comdat_group list in which NODE resides. */
void
-symtab_dissolve_same_comdat_group_list (symtab_node node)
+symtab_dissolve_same_comdat_group_list (symtab_node *node)
{
- symtab_node n = node;
- symtab_node next;
+ symtab_node *n = node;
+ symtab_node *next;
if (!node->same_comdat_group)
return;
@@ -461,7 +461,7 @@ symtab_dissolve_same_comdat_group_list (symtab_node node)
is unknown go with identifier name. */
const char *
-symtab_node_asm_name (symtab_node node)
+symtab_node_asm_name (symtab_node *node)
{
if (!DECL_ASSEMBLER_NAME_SET_P (node->decl))
return lang_hooks.decl_printable_name (node->decl, 2);
@@ -471,7 +471,7 @@ symtab_node_asm_name (symtab_node node)
/* Return printable identifier name. */
const char *
-symtab_node_name (symtab_node node)
+symtab_node_name (symtab_node *node)
{
return lang_hooks.decl_printable_name (node->decl, 2);
}
@@ -481,7 +481,7 @@ static const char * const symtab_type_names[] = {"symbol", "function", "variable
/* Dump base fields of symtab nodes. Not to be used directly. */
void
-dump_symtab_base (FILE *f, symtab_node node)
+dump_symtab_base (FILE *f, symtab_node *node)
{
static const char * const visibility_types[] = {
"default", "protected", "hidden", "internal"
@@ -595,7 +595,7 @@ dump_symtab_base (FILE *f, symtab_node node)
/* Dump symtab node. */
void
-dump_symtab_node (FILE *f, symtab_node node)
+dump_symtab_node (FILE *f, symtab_node *node)
{
if (cgraph_node *cnode = dyn_cast <cgraph_node> (node))
dump_cgraph_node (f, cnode);
@@ -608,7 +608,7 @@ dump_symtab_node (FILE *f, symtab_node node)
void
dump_symtab (FILE *f)
{
- symtab_node node;
+ symtab_node *node;
fprintf (f, "Symbol table:\n\n");
FOR_EACH_SYMBOL (node)
dump_symtab_node (f, node);
@@ -617,7 +617,7 @@ dump_symtab (FILE *f)
/* Dump symtab node NODE to stderr. */
DEBUG_FUNCTION void
-debug_symtab_node (symtab_node node)
+debug_symtab_node (symtab_node *node)
{
dump_symtab_node (stderr, node);
}
@@ -633,10 +633,10 @@ debug_symtab (void)
/* Verify common part of symtab nodes. */
DEBUG_FUNCTION bool
-verify_symtab_base (symtab_node node)
+verify_symtab_base (symtab_node *node)
{
bool error_found = false;
- symtab_node hashed_node;
+ symtab_node *hashed_node;
if (is_a <cgraph_node> (node))
{
@@ -729,7 +729,7 @@ verify_symtab_base (symtab_node node)
}
if (node->same_comdat_group)
{
- symtab_node n = node->same_comdat_group;
+ symtab_node *n = node->same_comdat_group;
if (!DECL_ONE_ONLY (n->decl))
{
@@ -764,7 +764,7 @@ verify_symtab_base (symtab_node node)
/* Verify consistency of NODE. */
DEBUG_FUNCTION void
-verify_symtab_node (symtab_node node)
+verify_symtab_node (symtab_node *node)
{
if (seen_error ())
return;
@@ -786,7 +786,7 @@ verify_symtab_node (symtab_node node)
DEBUG_FUNCTION void
verify_symtab (void)
{
- symtab_node node;
+ symtab_node *node;
FOR_EACH_SYMBOL (node)
verify_symtab_node (node);
}
@@ -807,7 +807,7 @@ resolution_used_from_other_file_p (enum ld_plugin_symbol_resolution resolution)
Known only when doing LTO via linker plugin. */
bool
-symtab_used_from_object_file_p (symtab_node node)
+symtab_used_from_object_file_p (symtab_node *node)
{
if (!TREE_PUBLIC (node->decl) || DECL_EXTERNAL (node->decl))
return false;
@@ -859,7 +859,7 @@ symtab_make_decl_local (tree decl)
/* Return availability of NODE. */
enum availability
-symtab_node_availability (symtab_node node)
+symtab_node_availability (symtab_node *node)
{
if (is_a <cgraph_node> (node))
return cgraph_function_body_availability (cgraph (node));
@@ -871,8 +871,8 @@ symtab_node_availability (symtab_node node)
If NODE is not an alias, return NODE.
When AVAILABILITY is non-NULL, get minimal availability in the chain. */
-symtab_node
-symtab_alias_ultimate_target (symtab_node node, enum availability *availability)
+symtab_node *
+symtab_alias_ultimate_target (symtab_node *node, enum availability *availability)
{
bool weakref_p = false;
@@ -947,7 +947,7 @@ symtab_alias_ultimate_target (symtab_node node, enum availability *availability)
copy the visibility from the target to get things right. */
void
-fixup_same_cpp_alias_visibility (symtab_node node, symtab_node target)
+fixup_same_cpp_alias_visibility (symtab_node *node, symtab_node *target)
{
if (is_a <cgraph_node> (node))
{
@@ -983,9 +983,9 @@ fixup_same_cpp_alias_visibility (symtab_node node, symtab_node target)
it returns false. */
bool
-symtab_resolve_alias (symtab_node node, symtab_node target)
+symtab_resolve_alias (symtab_node *node, symtab_node *target)
{
- symtab_node n;
+ symtab_node *n;
gcc_assert (!node->analyzed
&& !vec_safe_length (node->ref_list.references));
@@ -1031,8 +1031,8 @@ symtab_resolve_alias (symtab_node node, symtab_node target)
skipped. */
bool
-symtab_for_node_and_aliases (symtab_node node,
- bool (*callback) (symtab_node, void *),
+symtab_for_node_and_aliases (symtab_node *node,
+ bool (*callback) (symtab_node *, void *),
void *data,
bool include_overwritable)
{
@@ -1044,7 +1044,7 @@ symtab_for_node_and_aliases (symtab_node node,
for (i = 0; ipa_ref_list_referring_iterate (&node->ref_list, i, ref); i++)
if (ref->use == IPA_REF_ALIAS)
{
- symtab_node alias = ref->referring;
+ symtab_node *alias = ref->referring;
if (include_overwritable
|| symtab_node_availability (alias) > AVAIL_OVERWRITABLE)
if (symtab_for_node_and_aliases (alias, callback, data,
@@ -1057,11 +1057,11 @@ symtab_for_node_and_aliases (symtab_node node,
/* Worker searching nonoverwritable alias. */
static bool
-symtab_nonoverwritable_alias_1 (symtab_node node, void *data)
+symtab_nonoverwritable_alias_1 (symtab_node *node, void *data)
{
if (decl_binds_to_current_def_p (node->decl))
{
- *(symtab_node *)data = node;
+ *(symtab_node **)data = node;
return true;
}
return false;
@@ -1071,11 +1071,11 @@ symtab_nonoverwritable_alias_1 (symtab_node node, void *data)
definition, return NODE. Otherwise look for alias with such property and if
none exists, introduce new one. */
-symtab_node
-symtab_nonoverwritable_alias (symtab_node node)
+symtab_node *
+symtab_nonoverwritable_alias (symtab_node *node)
{
tree new_decl;
- symtab_node new_node = NULL;
+ symtab_node *new_node = NULL;
/* First try to look up existing alias or base object
(if that is already non-overwritable). */
@@ -1126,12 +1126,12 @@ symtab_nonoverwritable_alias (symtab_node node)
/* Return true if A and B represents semantically equivalent symbols. */
bool
-symtab_semantically_equivalent_p (symtab_node a,
- symtab_node b)
+symtab_semantically_equivalent_p (symtab_node *a,
+ symtab_node *b)
{
enum availability avail;
- symtab_node ba;
- symtab_node bb;
+ symtab_node *ba;
+ symtab_node *bb;
/* Equivalent functions are equivalent. */
if (a->decl == b->decl)
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index 7be54ce4a8e..0a9388285bb 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -1209,8 +1209,8 @@ init_node_map (bool local)
n->profile_id,
cgraph_node_name (n),
n->order,
- symtab_node_name (*(symtab_node*)val),
- (*(symtab_node *)val)->order);
+ symtab_node_name (*(symtab_node **)val),
+ (*(symtab_node **)val)->order);
n->profile_id = (n->profile_id + 1) & 0x7fffffff;
}
}
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 099992e8405..beafb558c9c 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -5382,7 +5382,7 @@ weak_finish_1 (tree decl)
static tree
find_decl (tree target)
{
- symtab_node node = symtab_node_for_asm (target);
+ symtab_node *node = symtab_node_for_asm (target);
if (node)
return node->decl;
return NULL_TREE;
diff --git a/gcc/varpool.c b/gcc/varpool.c
index 2db666ac80f..4f1658ea635 100644
--- a/gcc/varpool.c
+++ b/gcc/varpool.c
@@ -234,7 +234,7 @@ debug_varpool (void)
struct varpool_node *
varpool_node_for_asm (tree asmname)
{
- if (symtab_node node = symtab_node_for_asm (asmname))
+ if (symtab_node *node = symtab_node_for_asm (asmname))
return dyn_cast <varpool_node> (node);
else
return NULL;
@@ -512,7 +512,7 @@ varpool_remove_unreferenced_decls (void)
if (node->same_comdat_group)
{
- symtab_node next;
+ symtab_node *next;
for (next = node->same_comdat_group;
next != node;
next = next->same_comdat_group)