aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2013-10-29 18:30:00 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2013-10-29 18:30:00 +0000
commit67348ccc9ca5c667400851fa252a0e542847cb66 (patch)
treef3633e8f82a98ad68711b7c65603427a81a4f40c /gcc/ipa.c
parenta3bfa8b80c84f097b684b5ba7851ceb81642ccd3 (diff)
downloadgcc-67348ccc9ca5c667400851fa252a0e542847cb66.zip
gcc-67348ccc9ca5c667400851fa252a0e542847cb66.tar.gz
gcc-67348ccc9ca5c667400851fa252a0e542847cb66.tar.bz2
Autogenerated fixes of "->symbol." to "->"
This is the autogenerated part of the conversion of the symtable types to a C++ class hierarchy. gcc/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * asan.c (asan_finish_file): Update for conversion of symtab types to a true class hierarchy. * cfgexpand.c (estimated_stack_frame_size): Likewise. * cgraph.c (cgraph_get_body): Likewise. (cgraph_get_create_real_symbol_node): Likewise. (verify_cgraph_node): Likewise. (verify_edge_corresponds_to_fndecl): Likewise. (verify_edge_count_and_frequency): Likewise. (cgraph_will_be_removed_from_program_if_no_direct_calls): Likewise. (cgraph_can_remove_if_no_direct_calls_p): Likewise. (cgraph_can_remove_if_no_direct_calls_and_refs_p): Likewise. (cgraph_node_cannot_return): Likewise. (cgraph_set_pure_flag_1): Likewise. (cgraph_set_const_flag_1): Likewise. (cgraph_set_nothrow_flag_1): Likewise. (cgraph_make_node_local_1): Likewise. (cgraph_for_node_and_aliases): Likewise. (cgraph_for_node_thunks_and_aliases): Likewise. (cgraph_node_can_be_local_p): Likewise. (cgraph_node_cannot_be_local_p_1): Likewise. (cgraph_function_body_availability): Likewise. (dump_cgraph_node): Likewise. (cgraph_rtl_info): Likewise. (cgraph_mark_address_taken_node): Likewise. (cgraph_remove_node): Likewise. (cgraph_release_function_body): Likewise. (cgraph_update_edges_for_call_stmt_node): Likewise. (cgraph_redirect_edge_call_stmt_to_callee): Likewise. (cgraph_make_edge_direct): Likewise. (cgraph_resolve_speculation): Likewise. (cgraph_speculative_call_info): Likewise. (cgraph_turn_edge_to_speculative): Likewise. (cgraph_create_edge_1): Likewise. (cgraph_set_call_stmt): Likewise. (cgraph_node_for_asm): Likewise. (cgraph_add_thunk): Likewise. (cgraph_same_body_alias): Likewise. (cgraph_create_function_alias): Likewise. (cgraph_create_node): Likewise. (cgraph_create_empty_node): Likewise. (record_function_versions): Likewise. (used_from_object_file_p): Likewise. * cgraph.h (symtab_can_be_discarded): Likewise. (symtab_real_symbol_p): Likewise. (cgraph_mark_force_output_node): Likewise. (cgraph_edge_recursive_p): Likewise. (symtab_alias_target): Likewise. (varpool_all_refs_explicit_p): Likewise. (varpool_can_remove_if_no_refs): Likewise. (cgraph_only_called_directly_or_aliased_p): Likewise. (cgraph_next_function_with_gimple_body): Likewise. (cgraph_first_function_with_gimple_body): Likewise. (cgraph_function_with_gimple_body_p): Likewise. (cgraph_next_function): Likewise. (cgraph_first_function): Likewise. (cgraph_next_defined_function): Likewise. (cgraph_first_defined_function): Likewise. (varpool_next_defined_variable): Likewise. (varpool_first_defined_variable): Likewise. (varpool_next_static_initializer): Likewise. (varpool_first_static_initializer): Likewise. (varpool_next_variable): Likewise. (varpool_first_variable): Likewise. (varpool_node_name): Likewise. (varpool): Likewise. (cgraph): Likewise. (is_a_helper <varpool_node>::test): Likewise. (is_a_helper <cgraph_node>::test): Likewise. (varpool_variable_node): Likewise. (cgraph_function_or_thunk_node): Likewise. (varpool_alias_target): Likewise. (cgraph_alias_target): Likewise. (cgraph_node_name): Likewise. (varpool_node_asm_name): Likewise. (cgraph_node_asm_name): Likewise. * cgraphbuild.c (remove_cgraph_callee_edges): Likewise. (cgraph_rebuild_references): Likewise. (rebuild_cgraph_edges): Likewise. (record_eh_tables): Likewise. (build_cgraph_edges): Likewise. (mark_store): Likewise. (mark_load): Likewise. (mark_address): Likewise. (record_type_list): Likewise. (record_reference): Likewise. * cgraphclones.c (cgraph_materialize_all_clones): Likewise. (cgraph_materialize_clone): Likewise. (cgraph_function_versioning): Likewise. (cgraph_copy_node_for_versioning): Likewise. (update_call_expr): Likewise. (cgraph_find_replacement_node): Likewise. (cgraph_create_virtual_clone): Likewise. (cgraph_clone_node): Likewise. * cgraphunit.c (compile): Likewise. (output_weakrefs): Likewise. (output_in_order): Likewise. (expand_function): Likewise. (assemble_thunks_and_aliases): Likewise. (expand_thunk): Likewise. (mark_functions_to_output): Likewise. (handle_alias_pairs): Likewise. (analyze_functions): Likewise. (walk_polymorphic_call_targets): Likewise. (varpool_finalize_decl): Likewise. (process_function_and_variable_attributes): Likewise. (cgraph_process_same_body_aliases): Likewise. (analyze_function): Likewise. (cgraph_add_new_function): Likewise. (cgraph_finalize_function): Likewise. (referred_to_p): Likewise. (cgraph_reset_node): Likewise. (cgraph_process_new_functions): Likewise. (enqueue_node): Likewise. (decide_is_symbol_needed): Likewise. * coverage.c (coverage_compute_profile_id): Likewise. * dbxout.c (dbxout_expand_expr): Likewise. * dwarf2out.c (premark_types_used_by_global_vars_helper): Likewise. (reference_to_unused): Likewise. * gimple-fold.c (can_refer_decl_in_current_unit_p): Likewise. * gimplify.c (unvisit_body): Likewise. (unshare_body): Likewise. * ipa-cp.c (ipcp_generate_summary): Likewise. (ipcp_decision_stage): Likewise. (identify_dead_nodes): Likewise. (decide_whether_version_node): Likewise. (decide_about_value): Likewise. (perhaps_add_new_callers): Likewise. (create_specialized_node): Likewise. (update_profiling_info): Likewise. (ipcp_propagate_stage): Likewise. (estimate_local_effects): Likewise. (good_cloning_opportunity_p): Likewise. (devirtualization_time_bonus): Likewise. (propagate_constants_accross_call): Likewise. (initialize_node_lattices): Likewise. (ipcp_cloning_candidate_p): Likewise. (determine_versionability): Likewise. (print_all_lattices): Likewise. (print_lattice): Likewise. (ipcp_discover_new_direct_edges): Likewise. * ipa-devirt.c (ipa_devirt): Likewise. (likely_target_p): Likewise. (update_type_inheritance_graph): Likewise. (possible_polymorphic_call_target_p): Likewise. (dump_possible_polymorphic_call_targets): Likewise. (devirt_variable_node_removal_hook): Likewise. (record_binfo): Likewise. (maybe_record_node): Likewise. (build_type_inheritance_graph): Likewise. * ipa-inline-analysis.c (inline_write_summary): Likewise. (inline_generate_summary): Likewise. (inline_analyze_function): Likewise. (do_estimate_growth): Likewise. (simple_edge_hints): Likewise. (estimate_node_size_and_time): Likewise. (estimate_edge_devirt_benefit): Likewise. (compute_inline_parameters): Likewise. (estimate_function_body_sizes): Likewise. (compute_bb_predicates): Likewise. (initialize_inline_failed): Likewise. (dump_inline_summary): Likewise. (dump_inline_edge_summary): Likewise. * ipa-inline-transform.c (inline_transform): Likewise. (preserve_function_body_p): Likewise. (save_inline_function_body): Likewise. (inline_call): Likewise. (clone_inlined_nodes): Likewise. (can_remove_node_now_p): Likewise. (can_remove_node_now_p_1): Likewise. * ipa-inline.c (early_inliner): Likewise. (early_inline_small_functions): Likewise. (inline_always_inline_functions): Likewise. (ipa_inline): Likewise. (flatten_function): Likewise. (inline_small_functions): Likewise. (speculation_useful_p): Likewise. (recursive_inlining): Likewise. (update_caller_keys): Likewise. (reset_edge_caches): Likewise. (update_edge_key): Likewise. (edge_badness): Likewise. (relative_time_benefit): Likewise. (want_inline_self_recursive_call_p): Likewise. (want_inline_small_function_p): Likewise. (want_early_inline_function_p): Likewise. (num_calls): Likewise. (can_early_inline_edge_p): Likewise. (can_inline_edge_p): Likewise. (report_inline_failed_reason): Likewise. * ipa-profile.c (ipa_profile): Likewise. (ipa_propagate_frequency): Likewise. (ipa_propagate_frequency_1): Likewise. (ipa_profile_generate_summary): Likewise. * ipa-prop.c (ipcp_transform_function): Likewise. (read_replacements_section): Likewise. (ipa_prop_read_section): Likewise. (ipa_modify_call_arguments): Likewise. (ipa_print_node_params): Likewise. (propagate_controlled_uses): Likewise. (update_indirect_edges_after_inlining): Likewise. (remove_described_reference): Likewise. (ipa_make_edge_direct_to_target): Likewise. (ipa_analyze_node): Likewise. (ipa_analyze_params_uses): Likewise. (ipa_compute_jump_functions): Likewise. (ipa_get_callee_param_type): Likewise. (ipa_print_node_jump_functions): Likewise. (ipa_initialize_node_params): Likewise. (ipa_populate_param_decls): Likewise. (ipa_func_spec_opts_forbid_analysis_p): Likewise. (write_agg_replacement_chain): Likewise. (ipa_write_node_info): Likewise. (ipa_edge_duplication_hook): Likewise. (try_decrement_rdesc_refcount): Likewise. * ipa-pure-const.c (propagate_nothrow): Likewise. (propagate_pure_const): Likewise. (pure_const_read_summary): Likewise. (pure_const_write_summary): Likewise. (analyze_function): Likewise. * ipa-ref-inline.h (ipa_ref_referred_ref_list): Likewise. (ipa_ref_referring_ref_list): Likewise. * ipa-ref.c (ipa_clear_stmts_in_references): Likewise. (ipa_remove_stmt_references): Likewise. (ipa_find_reference): Likewise. (ipa_dump_referring): Likewise. (ipa_dump_references): Likewise. (ipa_record_reference): Likewise. * ipa-reference.c (ipa_reference_read_optimization_summary): Likewise. (ipa_reference_write_optimization_summary): Likewise. (write_node_summary_p): Likewise. (propagate): Likewise. (read_write_all_from_decl): Likewise. (generate_summary): Likewise. (analyze_function): Likewise. (propagate_bits): Likewise. (ipa_reference_get_not_written_global): Likewise. (ipa_reference_get_not_read_global): Likewise. * ipa-split.c (execute_split_functions): Likewise. (split_function): Likewise. * ipa-utils.c (ipa_merge_profiles): Likewise. (dump_cgraph_node_set): Likewise. (ipa_reverse_postorder): Likewise. (ipa_edge_within_scc): Likewise. (ipa_get_nodes_in_cycle): Likewise. (ipa_free_postorder_info): Likewise. (ipa_reduced_postorder): Likewise. (searchc): Likewise. (recursive_call_p): Likewise. * ipa.c (ipa_cdtor_merge): Likewise. (record_cdtor_fn): Likewise. (function_and_variable_visibility): Likewise. (varpool_externally_visible_p): Likewise. (cgraph_externally_visible_p): Likewise. (comdat_can_be_unshared_p): Likewise. (comdat_can_be_unshared_p_1): Likewise. (address_taken_from_non_vtable_p): Likewise. (ipa_discover_readonly_nonaddressable_vars): Likewise. (symtab_remove_unreachable_nodes): Likewise. (walk_polymorphic_call_targets): Likewise. (process_references): Likewise. (enqueue_node): Likewise. (has_addr_references_p): Likewise. (cgraph_non_local_node_p_1): Likewise. * is-a.h (varpool_analyze_node): Likewise. * lto-cgraph.c (input_symtab): Likewise. (merge_profile_summaries): Likewise. (input_cgraph_1): Likewise. (input_edge): Likewise. (input_varpool_node): Likewise. (input_node): Likewise. (input_overwrite_node): Likewise. (compute_ltrans_boundary): Likewise. (output_refs): Likewise. (lto_output_varpool_node): Likewise. (lto_output_node): Likewise. (reachable_from_other_partition_p): Likewise. (referenced_from_other_partition_p): Likewise. (lto_output_edge): Likewise. (output_node_opt_summary): Likewise. (add_node_to): Likewise. (reachable_from_this_partition_p): Likewise. (lto_set_symtab_encoder_in_partition): Likewise. (lto_symtab_encoder_in_partition_p): Likewise. (lto_set_symtab_encoder_encode_initializer): Likewise. (lto_symtab_encoder_encode_initializer_p): Likewise. (lto_set_symtab_encoder_encode_body): Likewise. (lto_symtab_encoder_encode_body_p): Likewise. * lto-section-in.c (lto_free_function_in_decl_state_for_node): Likewise. * lto-streamer-in.c (lto_read_body): Likewise. (fixup_call_stmt_edges): Likewise. (fixup_call_stmt_edges_1): Likewise. * lto-streamer-out.c (produce_symtab): Likewise. (output_symbol_p): Likewise. (write_symbol): Likewise. (lto_output): Likewise. (copy_function): Likewise. (output_function): Likewise. * passes.c (function_called_by_processed_nodes_p): Likewise. (ipa_write_optimization_summaries): Likewise. (ipa_write_summaries): Likewise. (do_per_function_toporder): Likewise. (do_per_function): Likewise. (dump_passes): Likewise. * symtab.c (symtab_semantically_equivalent_p): Likewise. (symtab_nonoverwritable_alias): Likewise. (symtab_nonoverwritable_alias_1): Likewise. (symtab_for_node_and_aliases): Likewise. (symtab_resolve_alias): Likewise. (fixup_same_cpp_alias_visibility): Likewise. (symtab_alias_ultimate_target): Likewise. (symtab_used_from_object_file_p): Likewise. (verify_symtab_base): Likewise. (dump_symtab_base): Likewise. (symtab_node_name): Likewise. (symtab_node_asm_name): Likewise. (symtab_dissolve_same_comdat_group_list): Likewise. (symtab_add_to_same_comdat_group): Likewise. (symtab_unregister_node): Likewise. (symtab_insert_node_to_hashtable): Likewise. (symtab_register_node): Likewise. (unlink_from_assembler_name_hash): Likewise. (insert_to_assembler_name_hash): Likewise. (eq_assembler_name): Likewise. (hash_node_by_assembler_name): Likewise. (eq_node): Likewise. (hash_node): Likewise. * toplev.c (wrapup_global_declaration_2): Likewise. * trans-mem.c (ipa_tm_execute): Likewise. (ipa_tm_transform_clone): Likewise. (ipa_tm_transform_transaction): Likewise. (ipa_tm_transform_calls_redirect): Likewise. (ipa_tm_insert_gettmclone_call): Likewise. (ipa_tm_insert_irr_call): Likewise. (ipa_tm_create_version): Likewise. (ipa_tm_create_version_alias): Likewise. (ipa_tm_mark_forced_by_abi_node): Likewise. (ipa_tm_mark_force_output_node): Likewise. (ipa_tm_diagnose_tm_safe): Likewise. (ipa_tm_mayenterirr_function): Likewise. (ipa_tm_scan_irr_function): Likewise. (ipa_tm_note_irrevocable): Likewise. (ipa_tm_scan_calls_clone): Likewise. (get_cg_data): Likewise. * tree-eh.c (tree_could_trap_p): Likewise. * tree-emutls.c (ipa_lower_emutls): Likewise. (create_emultls_var): Likewise. (lower_emutls_function_body): Likewise. (gen_emutls_addr): Likewise. (emutls_decl): Likewise. (new_emutls_decl): Likewise. * tree-inline.c (tree_function_versioning): Likewise. (optimize_inline_calls): Likewise. (expand_call_inline): Likewise. (estimate_num_insns): Likewise. (copy_bb): Likewise. (delete_unreachable_blocks_update_callgraph): Likewise. * tree-nested.c (gimplify_all_functions): Likewise. (create_nesting_tree): Likewise. (check_for_nested_with_variably_modified): Likewise. * tree-pretty-print.c (dump_function_header): Likewise. * tree-profile.c (tree_profiling): Likewise. * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise. (modify_function): Likewise. (convert_callers): Likewise. (convert_callers_for_node): Likewise. * tree-ssa-structalias.c (ipa_pta_execute): Likewise. (associate_varinfo_to_alias): Likewise. (create_variable_info_for): Likewise. (get_constraint_for_ssa_var): Likewise. * tree-vectorizer.c (increase_alignment): Likewise. * tree.c (find_decls_types_in_var): Likewise. (find_decls_types_in_node): Likewise. (free_lang_data_in_decl): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_ic): Likewise. (check_ic_target): Likewise. (init_node_map): Likewise. * varasm.c (decl_binds_to_current_def_p): Likewise. (default_binds_local_p_1): Likewise. (dump_tm_clone_pairs): Likewise. (assemble_alias): Likewise. (find_decl): Likewise. (mark_decl_referenced): Likewise. * varpool.c (varpool_for_node_and_aliases): Likewise. (varpool_extra_name_alias): Likewise. (varpool_create_variable_alias): Likewise. (add_new_static_var): Likewise. (varpool_finalize_named_section_flags): Likewise. (varpool_remove_unreferenced_decls): Likewise. (enqueue_node): Likewise. (varpool_assemble_decl): Likewise. (assemble_aliases): Likewise. (varpool_analyze_node): Likewise. (cgraph_variable_initializer_availability): Likewise. (varpool_add_new_variable): Likewise. (ctor_for_folding): Likewise. (dump_varpool_node): Likewise. (varpool_remove_initializer): Likewise. (varpool_remove_node): Likewise. (varpool_node_for_decl): Likewise. (varpool_create_empty_node): Likewise. * config/i386/i386.c (ix86_generate_version_dispatcher_body): Likewise. (ix86_get_function_versions_dispatcher): Likewise. gcc/ada/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * gcc-interface/trans.c (finalize_nrv): Update for conversion of symtab types to a true class hierarchy. * gcc-interface/utils.c (gnat_write_global_declarations): Likewise. gcc/c-family/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * c-gimplify.c (c_genericize): Update for conversion of symtab types to a true class hierarchy. * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise. gcc/cp/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * call.c (mark_versions_used): Update for conversion of symtab types to a true class hierarchy. * decl2.c (cp_write_global_declarations): Likewise. (clear_decl_external): Likewise. (build_java_method_aliases): Likewise. (collect_candidates_for_java_method_aliases): Likewise. (mark_needed): Likewise. (var_finalized_p): Likewise. (maybe_make_one_only): Likewise. (maybe_emit_vtables): Likewise. * lambda.c (maybe_add_lambda_conv_op): Likewise. * method.c (use_thunk): Likewise. * optimize.c (maybe_clone_body): Likewise. * tree.c (cp_fix_function_decl_p): Likewise. gcc/java/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * decl.c (java_mark_decl_local): Update for conversion of symtab types to a true class hierarchy. gcc/lto/ Patch autogenerated by refactor_symtab.py from https://github.com/davidmalcolm/gcc-refactoring-scripts revision 58bb219cc090b2f4516a9297d868c245495ee622 * lto-partition.c (lto_promote_cross_file_statics): Update for conversion of symtab types to a true class hierarchy. (rename_statics): Likewise. (promote_symbol): Likewise. (privatize_symbol_name): Likewise. (lto_balanced_map): Likewise. (varpool_node_cmp): Likewise. (node_cmp): Likewise. (lto_1_to_1_map): Likewise. (undo_partition): Likewise. (add_symbol_to_partition): Likewise. (contained_in_symbol): Likewise. (add_symbol_to_partition_1): Likewise. (add_references_to_partition): Likewise. (symbol_partitioned_p): Likewise. (get_symbol_class): Likewise. (lto_max_map): Likewise. * lto-symtab.c (lto_symtab_prevailing_decl): Likewise. (lto_symtab_merge_symbols): Likewise. (lto_symtab_merge_symbols_1): Likewise. (lto_symtab_merge_decls): Likewise. (lto_symtab_merge_decls_1): Likewise. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_resolve_symbols): Likewise. (lto_symtab_resolve_can_prevail_p): Likewise. (lto_symtab_symbol_p): Likewise. (lto_symtab_resolve_replaceable_p): Likewise. (lto_symtab_merge): Likewise. (lto_varpool_replace_node): Likewise. (lto_cgraph_replace_node): Likewise. * lto.c (lto_main): Likewise. (do_whole_program_analysis): Likewise. (materialize_cgraph): Likewise. (read_cgraph_and_symbols): Likewise. (cmp_partitions_order): Likewise. (lto_materialize_function): Likewise. (has_analyzed_clone_p): Likewise. From-SVN: r204171
Diffstat (limited to 'gcc/ipa.c')
-rw-r--r--gcc/ipa.c428
1 files changed, 214 insertions, 214 deletions
diff --git a/gcc/ipa.c b/gcc/ipa.c
index 80a97ba..868a9d2 100644
--- a/gcc/ipa.c
+++ b/gcc/ipa.c
@@ -43,12 +43,12 @@ cgraph_non_local_node_p_1 (struct cgraph_node *node, void *data ATTRIBUTE_UNUSED
{
/* FIXME: Aliases can be local, but i386 gets thunks wrong then. */
return !(cgraph_only_called_directly_or_aliased_p (node)
- && !ipa_ref_has_aliases_p (&node->symbol.ref_list)
- && node->symbol.definition
- && !DECL_EXTERNAL (node->symbol.decl)
- && !node->symbol.externally_visible
- && !node->symbol.used_from_other_partition
- && !node->symbol.in_other_partition);
+ && !ipa_ref_has_aliases_p (&node->ref_list)
+ && node->definition
+ && !DECL_EXTERNAL (node->decl)
+ && !node->externally_visible
+ && !node->used_from_other_partition
+ && !node->in_other_partition);
}
/* Return true when function can be marked local. */
@@ -76,7 +76,7 @@ has_addr_references_p (struct cgraph_node *node,
int i;
struct ipa_ref *ref;
- for (i = 0; ipa_ref_list_referring_iterate (&node->symbol.ref_list,
+ for (i = 0; ipa_ref_list_referring_iterate (&node->ref_list,
i, ref); i++)
if (ref->use == IPA_REF_ADDR)
return true;
@@ -111,13 +111,13 @@ enqueue_node (symtab_node node, symtab_node *first,
struct pointer_set_t *reachable)
{
/* Node is still in queue; do nothing. */
- if (node->symbol.aux && node->symbol.aux != (void *) 2)
+ if (node->aux && node->aux != (void *) 2)
return;
/* Node was already processed as unreachable, re-enqueue
only if it became reachable now. */
- if (node->symbol.aux == (void *)2 && !pointer_set_contains (reachable, node))
+ if (node->aux == (void *)2 && !pointer_set_contains (reachable, node))
return;
- node->symbol.aux = *first;
+ node->aux = *first;
*first = node;
}
@@ -135,18 +135,18 @@ process_references (struct ipa_ref_list *list,
{
symtab_node node = ref->referred;
- if (node->symbol.definition && !node->symbol.in_other_partition
- && ((!DECL_EXTERNAL (node->symbol.decl) || node->symbol.alias)
+ if (node->definition && !node->in_other_partition
+ && ((!DECL_EXTERNAL (node->decl) || node->alias)
|| (before_inlining_p
/* We use variable constructors during late complation for
constant folding. Keep references alive so partitioning
knows about potential references. */
- || (TREE_CODE (node->symbol.decl) == VAR_DECL
+ || (TREE_CODE (node->decl) == VAR_DECL
&& flag_wpa
- && ctor_for_folding (node->symbol.decl)
+ && ctor_for_folding (node->decl)
!= error_mark_node))))
pointer_set_insert (reachable, node);
- enqueue_node ((symtab_node) node, first, reachable);
+ enqueue_node (node, first, reachable);
}
}
@@ -181,21 +181,21 @@ walk_polymorphic_call_targets (pointer_set_t *reachable_call_targets,
/* Do not bother to mark virtual methods in anonymous namespace;
either we will find use of virtual table defining it, or it is
unused. */
- if (TREE_CODE (TREE_TYPE (n->symbol.decl)) == METHOD_TYPE
+ if (TREE_CODE (TREE_TYPE (n->decl)) == METHOD_TYPE
&& type_in_anonymous_namespace_p
- (method_class_type (TREE_TYPE (n->symbol.decl))))
+ (method_class_type (TREE_TYPE (n->decl))))
continue;
/* Prior inlining, keep alive bodies of possible targets for
devirtualization. */
- if (n->symbol.definition
+ if (n->definition
&& before_inlining_p)
pointer_set_insert (reachable, n);
/* Even after inlining we want to keep the possible targets in the
boundary, so late passes can still produce direct call even if
the chance for inlining is lost. */
- enqueue_node ((symtab_node) n, first, reachable);
+ enqueue_node (n, first, reachable);
}
}
@@ -218,8 +218,8 @@ walk_polymorphic_call_targets (pointer_set_t *reachable_call_targets,
fprintf (dump_file,
"Devirtualizing call in %s/%i to %s/%i\n",
cgraph_node_name (edge->caller),
- edge->caller->symbol.order,
- cgraph_node_name (target), target->symbol.order);
+ edge->caller->order,
+ cgraph_node_name (target), target->order);
edge = cgraph_make_edge_direct (edge, target);
if (!inline_summary_vec && edge->call_stmt)
cgraph_redirect_edge_call_stmt_to_callee (edge);
@@ -305,9 +305,9 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
fprintf (file, "\nReclaiming functions:");
#ifdef ENABLE_CHECKING
FOR_EACH_FUNCTION (node)
- gcc_assert (!node->symbol.aux);
+ gcc_assert (!node->aux);
FOR_EACH_VARIABLE (vnode)
- gcc_assert (!vnode->symbol.aux);
+ gcc_assert (!vnode->aux);
#endif
/* Mark functions whose bodies are obviously needed.
This is mostly when they can be referenced externally. Inline clones
@@ -316,26 +316,26 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
FOR_EACH_FUNCTION (node)
{
node->used_as_abstract_origin = false;
- if (node->symbol.definition
+ if (node->definition
&& !node->global.inlined_to
- && !node->symbol.in_other_partition
+ && !node->in_other_partition
&& !cgraph_can_remove_if_no_direct_calls_and_refs_p (node))
{
gcc_assert (!node->global.inlined_to);
pointer_set_insert (reachable, node);
- enqueue_node ((symtab_node)node, &first, reachable);
+ enqueue_node (node, &first, reachable);
}
else
- gcc_assert (!node->symbol.aux);
+ gcc_assert (!node->aux);
}
/* Mark variables that are obviously needed. */
FOR_EACH_DEFINED_VARIABLE (vnode)
if (!varpool_can_remove_if_no_refs (vnode)
- && !vnode->symbol.in_other_partition)
+ && !vnode->in_other_partition)
{
pointer_set_insert (reachable, vnode);
- enqueue_node ((symtab_node)vnode, &first, reachable);
+ enqueue_node (vnode, &first, reachable);
}
/* Perform reachability analysis. */
@@ -344,34 +344,34 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
bool in_boundary_p = !pointer_set_contains (reachable, first);
symtab_node node = first;
- first = (symtab_node)first->symbol.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. */
if (in_boundary_p)
- node->symbol.aux = (void *)2;
+ node->aux = (void *)2;
else
{
- if (DECL_ABSTRACT_ORIGIN (node->symbol.decl))
+ if (DECL_ABSTRACT_ORIGIN (node->decl))
{
struct cgraph_node *origin_node
- = cgraph_get_create_real_symbol_node (DECL_ABSTRACT_ORIGIN (node->symbol.decl));
+ = cgraph_get_create_real_symbol_node (DECL_ABSTRACT_ORIGIN (node->decl));
origin_node->used_as_abstract_origin = true;
- enqueue_node ((symtab_node) origin_node, &first, reachable);
+ enqueue_node (origin_node, &first, reachable);
}
/* If any symbol in a comdat group is reachable, force
all other in the same comdat group to be also reachable. */
- if (node->symbol.same_comdat_group)
+ if (node->same_comdat_group)
{
symtab_node next;
- for (next = node->symbol.same_comdat_group;
+ for (next = node->same_comdat_group;
next != node;
- next = next->symbol.same_comdat_group)
+ next = next->same_comdat_group)
if (!pointer_set_insert (reachable, next))
- enqueue_node ((symtab_node) next, &first, reachable);
+ enqueue_node (next, &first, reachable);
}
/* Mark references as reachable. */
- process_references (&node->symbol.ref_list, &first,
+ process_references (&node->ref_list, &first,
before_inlining_p, reachable);
}
@@ -397,31 +397,31 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
}
for (e = cnode->callees; e; e = e->next_callee)
{
- if (e->callee->symbol.definition
- && !e->callee->symbol.in_other_partition
+ if (e->callee->definition
+ && !e->callee->in_other_partition
&& (!e->inline_failed
- || !DECL_EXTERNAL (e->callee->symbol.decl)
- || e->callee->symbol.alias
+ || !DECL_EXTERNAL (e->callee->decl)
+ || e->callee->alias
|| before_inlining_p))
pointer_set_insert (reachable, e->callee);
- enqueue_node ((symtab_node) e->callee, &first, reachable);
+ enqueue_node (e->callee, &first, reachable);
}
/* When inline clone exists, mark body to be preserved so when removing
offline copy of the function we don't kill it. */
if (cnode->global.inlined_to)
- pointer_set_insert (body_needed_for_clonning, cnode->symbol.decl);
+ pointer_set_insert (body_needed_for_clonning, cnode->decl);
/* For non-inline clones, force their origins to the boundary and ensure
that body is not removed. */
while (cnode->clone_of)
{
- bool noninline = cnode->clone_of->symbol.decl != cnode->symbol.decl;
+ bool noninline = cnode->clone_of->decl != cnode->decl;
cnode = cnode->clone_of;
if (noninline)
{
- pointer_set_insert (body_needed_for_clonning, cnode->symbol.decl);
- enqueue_node ((symtab_node)cnode, &first, reachable);
+ pointer_set_insert (body_needed_for_clonning, cnode->decl);
+ enqueue_node (cnode, &first, reachable);
}
}
}
@@ -431,12 +431,12 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
refers to. */
varpool_node *vnode = dyn_cast <varpool_node> (node);
if (vnode
- && DECL_EXTERNAL (node->symbol.decl)
- && !vnode->symbol.alias
+ && DECL_EXTERNAL (node->decl)
+ && !vnode->alias
&& in_boundary_p)
{
struct ipa_ref *ref;
- for (int i = 0; ipa_ref_list_reference_iterate (&node->symbol.ref_list, i, ref); i++)
+ for (int i = 0; ipa_ref_list_reference_iterate (&node->ref_list, i, ref); i++)
enqueue_node (ref->referred, &first, reachable);
}
}
@@ -447,7 +447,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
next = cgraph_next_function (node);
/* If node is not needed at all, remove it. */
- if (!node->symbol.aux)
+ if (!node->aux)
{
if (file)
fprintf (file, " %s", cgraph_node_name (node));
@@ -457,29 +457,29 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
/* If node is unreachable, remove its body. */
else if (!pointer_set_contains (reachable, node))
{
- if (!pointer_set_contains (body_needed_for_clonning, node->symbol.decl))
+ if (!pointer_set_contains (body_needed_for_clonning, node->decl))
cgraph_release_function_body (node);
else if (!node->clone_of)
- gcc_assert (in_lto_p || DECL_RESULT (node->symbol.decl));
- if (node->symbol.definition)
+ gcc_assert (in_lto_p || DECL_RESULT (node->decl));
+ if (node->definition)
{
if (file)
fprintf (file, " %s", cgraph_node_name (node));
- node->symbol.analyzed = false;
- node->symbol.definition = false;
- node->symbol.cpp_implicit_alias = false;
- node->symbol.alias = false;
- node->symbol.weakref = false;
- if (!node->symbol.in_other_partition)
+ node->analyzed = false;
+ node->definition = false;
+ node->cpp_implicit_alias = false;
+ node->alias = false;
+ node->weakref = false;
+ if (!node->in_other_partition)
node->local.local = false;
cgraph_node_remove_callees (node);
- ipa_remove_all_references (&node->symbol.ref_list);
+ ipa_remove_all_references (&node->ref_list);
changed = true;
}
}
else
gcc_assert (node->clone_of || !cgraph_function_with_gimple_body_p (node)
- || in_lto_p || DECL_RESULT (node->symbol.decl));
+ || in_lto_p || DECL_RESULT (node->decl));
}
/* Inline clones might be kept around so their materializing allows further
@@ -494,7 +494,7 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
node->global.inlined_to = NULL;
update_inlined_to_pointer (node, node);
}
- node->symbol.aux = NULL;
+ node->aux = NULL;
}
/* Remove unreachable variables. */
@@ -503,11 +503,11 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
for (vnode = varpool_first_variable (); vnode; vnode = vnext)
{
vnext = varpool_next_variable (vnode);
- if (!vnode->symbol.aux
+ if (!vnode->aux
/* For can_refer_decl_in_current_unit_p we want to track for
all external variables if they are defined in other partition
or not. */
- && (!flag_ltrans || !DECL_EXTERNAL (vnode->symbol.decl)))
+ && (!flag_ltrans || !DECL_EXTERNAL (vnode->decl)))
{
if (file)
fprintf (file, " %s", varpool_node_name (vnode));
@@ -517,25 +517,25 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
else if (!pointer_set_contains (reachable, vnode))
{
tree init;
- if (vnode->symbol.definition)
+ if (vnode->definition)
{
if (file)
fprintf (file, " %s", varpool_node_name (vnode));
changed = true;
}
- vnode->symbol.definition = false;
- vnode->symbol.analyzed = false;
- vnode->symbol.aux = NULL;
+ vnode->definition = false;
+ vnode->analyzed = false;
+ vnode->aux = NULL;
/* Keep body if it may be useful for constant folding. */
- if ((init = ctor_for_folding (vnode->symbol.decl)) == error_mark_node)
+ if ((init = ctor_for_folding (vnode->decl)) == error_mark_node)
varpool_remove_initializer (vnode);
else
- DECL_INITIAL (vnode->symbol.decl) = init;
- ipa_remove_all_references (&vnode->symbol.ref_list);
+ DECL_INITIAL (vnode->decl) = init;
+ ipa_remove_all_references (&vnode->ref_list);
}
else
- vnode->symbol.aux = NULL;
+ vnode->aux = NULL;
}
pointer_set_destroy (reachable);
@@ -546,14 +546,14 @@ symtab_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
if (file)
fprintf (file, "\nClearing address taken flags:");
FOR_EACH_DEFINED_FUNCTION (node)
- if (node->symbol.address_taken
- && !node->symbol.used_from_other_partition)
+ if (node->address_taken
+ && !node->used_from_other_partition)
{
if (!cgraph_for_node_and_aliases (node, has_addr_references_p, NULL, true))
{
if (file)
fprintf (file, " %s", cgraph_node_name (node));
- node->symbol.address_taken = false;
+ node->address_taken = false;
changed = true;
if (cgraph_local_node_p (node))
{
@@ -595,15 +595,15 @@ ipa_discover_readonly_nonaddressable_vars (void)
if (dump_file)
fprintf (dump_file, "Clearing variable flags:");
FOR_EACH_VARIABLE (vnode)
- if (vnode->symbol.definition && varpool_all_refs_explicit_p (vnode)
- && (TREE_ADDRESSABLE (vnode->symbol.decl)
- || !TREE_READONLY (vnode->symbol.decl)))
+ if (vnode->definition && varpool_all_refs_explicit_p (vnode)
+ && (TREE_ADDRESSABLE (vnode->decl)
+ || !TREE_READONLY (vnode->decl)))
{
bool written = false;
bool address_taken = false;
int i;
struct ipa_ref *ref;
- for (i = 0; ipa_ref_list_referring_iterate (&vnode->symbol.ref_list,
+ for (i = 0; ipa_ref_list_referring_iterate (&vnode->ref_list,
i, ref)
&& (!written || !address_taken); i++)
switch (ref->use)
@@ -617,21 +617,21 @@ ipa_discover_readonly_nonaddressable_vars (void)
written = true;
break;
}
- if (TREE_ADDRESSABLE (vnode->symbol.decl) && !address_taken)
+ if (TREE_ADDRESSABLE (vnode->decl) && !address_taken)
{
if (dump_file)
fprintf (dump_file, " %s (addressable)", varpool_node_name (vnode));
- TREE_ADDRESSABLE (vnode->symbol.decl) = 0;
+ TREE_ADDRESSABLE (vnode->decl) = 0;
}
- if (!TREE_READONLY (vnode->symbol.decl) && !address_taken && !written
+ if (!TREE_READONLY (vnode->decl) && !address_taken && !written
/* Making variable in explicit section readonly can cause section
type conflict.
See e.g. gcc.c-torture/compile/pr23237.c */
- && DECL_SECTION_NAME (vnode->symbol.decl) == NULL)
+ && DECL_SECTION_NAME (vnode->decl) == NULL)
{
if (dump_file)
fprintf (dump_file, " %s (read-only)", varpool_node_name (vnode));
- TREE_READONLY (vnode->symbol.decl) = 1;
+ TREE_READONLY (vnode->decl) = 1;
}
}
if (dump_file)
@@ -644,7 +644,7 @@ address_taken_from_non_vtable_p (symtab_node node)
{
int i;
struct ipa_ref *ref;
- for (i = 0; ipa_ref_list_referring_iterate (&node->symbol.ref_list,
+ for (i = 0; ipa_ref_list_referring_iterate (&node->ref_list,
i, ref); i++)
if (ref->use == IPA_REF_ADDR)
{
@@ -652,7 +652,7 @@ address_taken_from_non_vtable_p (symtab_node node)
if (is_a <cgraph_node> (ref->referring))
return true;
node = ipa_ref_referring_varpool_node (ref);
- if (!DECL_VIRTUAL_P (node->symbol.decl))
+ if (!DECL_VIRTUAL_P (node->decl))
return true;
}
return false;
@@ -667,29 +667,29 @@ comdat_can_be_unshared_p_1 (symtab_node node)
break eventually. Exception are virutal functions, C++
constructors/destructors and vtables, where this is not possible by
language standard. */
- if (!DECL_VIRTUAL_P (node->symbol.decl)
- && (TREE_CODE (node->symbol.decl) != FUNCTION_DECL
- || (!DECL_CXX_CONSTRUCTOR_P (node->symbol.decl)
- && !DECL_CXX_DESTRUCTOR_P (node->symbol.decl)))
+ if (!DECL_VIRTUAL_P (node->decl)
+ && (TREE_CODE (node->decl) != FUNCTION_DECL
+ || (!DECL_CXX_CONSTRUCTOR_P (node->decl)
+ && !DECL_CXX_DESTRUCTOR_P (node->decl)))
&& address_taken_from_non_vtable_p (node))
return false;
/* If the symbol is used in some weird way, better to not touch it. */
- if (node->symbol.force_output)
+ if (node->force_output)
return false;
/* Explicit instantiations needs to be output when possibly
used externally. */
- if (node->symbol.forced_by_abi
- && TREE_PUBLIC (node->symbol.decl)
- && (node->symbol.resolution != LDPR_PREVAILING_DEF_IRONLY
+ if (node->forced_by_abi
+ && TREE_PUBLIC (node->decl)
+ && (node->resolution != LDPR_PREVAILING_DEF_IRONLY
&& !flag_whole_program))
return false;
/* Non-readonly and volatile variables can not be duplicated. */
if (is_a <varpool_node> (node)
- && (!TREE_READONLY (node->symbol.decl)
- || TREE_THIS_VOLATILE (node->symbol.decl)))
+ && (!TREE_READONLY (node->decl)
+ || TREE_THIS_VOLATILE (node->decl)))
return false;
return true;
}
@@ -708,15 +708,15 @@ comdat_can_be_unshared_p (symtab_node node)
{
if (!comdat_can_be_unshared_p_1 (node))
return false;
- if (node->symbol.same_comdat_group)
+ if (node->same_comdat_group)
{
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
address taken. */
- for (next = node->symbol.same_comdat_group;
- next != node; next = next->symbol.same_comdat_group)
+ for (next = node->same_comdat_group;
+ next != node; next = next->same_comdat_group)
if (!comdat_can_be_unshared_p_1 (next))
return false;
}
@@ -729,10 +729,10 @@ static bool
cgraph_externally_visible_p (struct cgraph_node *node,
bool whole_program)
{
- if (!node->symbol.definition)
+ if (!node->definition)
return false;
- if (!TREE_PUBLIC (node->symbol.decl)
- || DECL_EXTERNAL (node->symbol.decl))
+ if (!TREE_PUBLIC (node->decl)
+ || DECL_EXTERNAL (node->decl))
return false;
/* Do not try to localize built-in functions yet. One of problems is that we
@@ -740,44 +740,44 @@ cgraph_externally_visible_p (struct cgraph_node *node,
using the implicit built-in declarations anymore. Similarly this enables
us to remove them as unreachable before actual calls may appear during
expansion or folding. */
- if (DECL_BUILT_IN (node->symbol.decl))
+ if (DECL_BUILT_IN (node->decl))
return true;
/* If linker counts on us, we must preserve the function. */
- if (symtab_used_from_object_file_p ((symtab_node) node))
+ if (symtab_used_from_object_file_p (node))
return true;
- if (DECL_PRESERVE_P (node->symbol.decl))
+ if (DECL_PRESERVE_P (node->decl))
return true;
if (lookup_attribute ("externally_visible",
- DECL_ATTRIBUTES (node->symbol.decl)))
+ DECL_ATTRIBUTES (node->decl)))
return true;
if (TARGET_DLLIMPORT_DECL_ATTRIBUTES
&& lookup_attribute ("dllexport",
- DECL_ATTRIBUTES (node->symbol.decl)))
+ DECL_ATTRIBUTES (node->decl)))
return true;
- if (node->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY)
+ if (node->resolution == LDPR_PREVAILING_DEF_IRONLY)
return false;
/* When doing LTO or whole program, we can bring COMDAT functoins static.
This improves code quality and we know we will duplicate them at most twice
(in the case that we are not using plugin and link with object file
implementing same COMDAT) */
if ((in_lto_p || whole_program)
- && DECL_COMDAT (node->symbol.decl)
- && comdat_can_be_unshared_p ((symtab_node) node))
+ && DECL_COMDAT (node->decl)
+ && comdat_can_be_unshared_p (node))
return false;
/* When doing link time optimizations, hidden symbols become local. */
if (in_lto_p
- && (DECL_VISIBILITY (node->symbol.decl) == VISIBILITY_HIDDEN
- || DECL_VISIBILITY (node->symbol.decl) == VISIBILITY_INTERNAL)
+ && (DECL_VISIBILITY (node->decl) == VISIBILITY_HIDDEN
+ || DECL_VISIBILITY (node->decl) == VISIBILITY_INTERNAL)
/* Be sure that node is defined in IR file, not in other object
file. In that case we don't set used_from_other_object_file. */
- && node->symbol.definition)
+ && node->definition)
;
else if (!whole_program)
return true;
- if (MAIN_NAME_P (DECL_NAME (node->symbol.decl)))
+ if (MAIN_NAME_P (DECL_NAME (node->decl)))
return true;
return false;
@@ -788,26 +788,26 @@ cgraph_externally_visible_p (struct cgraph_node *node,
bool
varpool_externally_visible_p (struct varpool_node *vnode)
{
- if (DECL_EXTERNAL (vnode->symbol.decl))
+ if (DECL_EXTERNAL (vnode->decl))
return true;
- if (!TREE_PUBLIC (vnode->symbol.decl))
+ if (!TREE_PUBLIC (vnode->decl))
return false;
/* If linker counts on us, we must preserve the function. */
- if (symtab_used_from_object_file_p ((symtab_node) vnode))
+ if (symtab_used_from_object_file_p (vnode))
return true;
- if (DECL_HARD_REGISTER (vnode->symbol.decl))
+ if (DECL_HARD_REGISTER (vnode->decl))
return true;
- if (DECL_PRESERVE_P (vnode->symbol.decl))
+ if (DECL_PRESERVE_P (vnode->decl))
return true;
if (lookup_attribute ("externally_visible",
- DECL_ATTRIBUTES (vnode->symbol.decl)))
+ DECL_ATTRIBUTES (vnode->decl)))
return true;
if (TARGET_DLLIMPORT_DECL_ATTRIBUTES
&& lookup_attribute ("dllexport",
- DECL_ATTRIBUTES (vnode->symbol.decl)))
+ DECL_ATTRIBUTES (vnode->decl)))
return true;
/* See if we have linker information about symbol not being used or
@@ -816,9 +816,9 @@ varpool_externally_visible_p (struct varpool_node *vnode)
Even if the linker clams the symbol is unused, never bring internal
symbols that are declared by user as used or externally visible.
This is needed for i.e. references from asm statements. */
- if (symtab_used_from_object_file_p ((symtab_node) vnode))
+ if (symtab_used_from_object_file_p (vnode))
return true;
- if (vnode->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY)
+ if (vnode->resolution == LDPR_PREVAILING_DEF_IRONLY)
return false;
/* As a special case, the COMDAT virtual tables can be unshared.
@@ -827,17 +827,17 @@ varpool_externally_visible_p (struct varpool_node *vnode)
is faster for dynamic linking. Also this match logic hidding vtables
from LTO symbol tables. */
if ((in_lto_p || flag_whole_program)
- && DECL_COMDAT (vnode->symbol.decl)
- && comdat_can_be_unshared_p ((symtab_node) vnode))
+ && DECL_COMDAT (vnode->decl)
+ && comdat_can_be_unshared_p (vnode))
return false;
/* When doing link time optimizations, hidden symbols become local. */
if (in_lto_p
- && (DECL_VISIBILITY (vnode->symbol.decl) == VISIBILITY_HIDDEN
- || DECL_VISIBILITY (vnode->symbol.decl) == VISIBILITY_INTERNAL)
+ && (DECL_VISIBILITY (vnode->decl) == VISIBILITY_HIDDEN
+ || DECL_VISIBILITY (vnode->decl) == VISIBILITY_INTERNAL)
/* Be sure that node is defined in IR file, not in other object
file. In that case we don't set used_from_other_object_file. */
- && vnode->symbol.definition)
+ && vnode->definition)
;
else if (!flag_whole_program)
return true;
@@ -849,7 +849,7 @@ varpool_externally_visible_p (struct varpool_node *vnode)
FIXME: We can do so for readonly vars with no address taken and
possibly also for vtables since no direct pointer comparsion is done.
It might be interesting to do so to reduce linking overhead. */
- if (DECL_COMDAT (vnode->symbol.decl) || DECL_WEAK (vnode->symbol.decl))
+ if (DECL_COMDAT (vnode->decl) || DECL_WEAK (vnode->decl))
return true;
return false;
}
@@ -887,85 +887,85 @@ function_and_variable_visibility (bool whole_program)
FOR_EACH_FUNCTION (node)
{
- int flags = flags_from_decl_or_type (node->symbol.decl);
+ int flags = flags_from_decl_or_type (node->decl);
/* Optimize away PURE and CONST constructors and destructors. */
if (optimize
&& (flags & (ECF_CONST | ECF_PURE))
&& !(flags & ECF_LOOPING_CONST_OR_PURE))
{
- DECL_STATIC_CONSTRUCTOR (node->symbol.decl) = 0;
- DECL_STATIC_DESTRUCTOR (node->symbol.decl) = 0;
+ DECL_STATIC_CONSTRUCTOR (node->decl) = 0;
+ DECL_STATIC_DESTRUCTOR (node->decl) = 0;
}
/* Frontends and alias code marks nodes as needed before parsing is finished.
We may end up marking as node external nodes where this flag is meaningless
strip it. */
- if (DECL_EXTERNAL (node->symbol.decl) || !node->symbol.definition)
+ if (DECL_EXTERNAL (node->decl) || !node->definition)
{
- node->symbol.force_output = 0;
- node->symbol.forced_by_abi = 0;
+ node->force_output = 0;
+ node->forced_by_abi = 0;
}
/* C++ FE on lack of COMDAT support create local COMDAT functions
(that ought to be shared but can not due to object format
limitations). It is necessary to keep the flag to make rest of C++ FE
happy. Clear the flag here to avoid confusion in middle-end. */
- if (DECL_COMDAT (node->symbol.decl) && !TREE_PUBLIC (node->symbol.decl))
- DECL_COMDAT (node->symbol.decl) = 0;
+ if (DECL_COMDAT (node->decl) && !TREE_PUBLIC (node->decl))
+ DECL_COMDAT (node->decl) = 0;
/* For external decls stop tracking same_comdat_group. It doesn't matter
what comdat group they are in when they won't be emitted in this TU. */
- if (node->symbol.same_comdat_group && DECL_EXTERNAL (node->symbol.decl))
+ if (node->same_comdat_group && DECL_EXTERNAL (node->decl))
{
#ifdef ENABLE_CHECKING
symtab_node n;
- for (n = node->symbol.same_comdat_group;
- n != (symtab_node)node;
- n = n->symbol.same_comdat_group)
+ for (n = node->same_comdat_group;
+ n != node;
+ n = n->same_comdat_group)
/* If at least one of same comdat group functions is external,
all of them have to be, otherwise it is a front-end bug. */
- gcc_assert (DECL_EXTERNAL (n->symbol.decl));
+ gcc_assert (DECL_EXTERNAL (n->decl));
#endif
- symtab_dissolve_same_comdat_group_list ((symtab_node) node);
+ symtab_dissolve_same_comdat_group_list (node);
}
- gcc_assert ((!DECL_WEAK (node->symbol.decl)
- && !DECL_COMDAT (node->symbol.decl))
- || TREE_PUBLIC (node->symbol.decl)
- || node->symbol.weakref
- || DECL_EXTERNAL (node->symbol.decl));
+ gcc_assert ((!DECL_WEAK (node->decl)
+ && !DECL_COMDAT (node->decl))
+ || TREE_PUBLIC (node->decl)
+ || node->weakref
+ || DECL_EXTERNAL (node->decl));
if (cgraph_externally_visible_p (node, whole_program))
{
gcc_assert (!node->global.inlined_to);
- node->symbol.externally_visible = true;
+ node->externally_visible = true;
}
else
{
- node->symbol.externally_visible = false;
- node->symbol.forced_by_abi = false;
+ node->externally_visible = false;
+ node->forced_by_abi = false;
}
- if (!node->symbol.externally_visible
- && node->symbol.definition && !node->symbol.weakref
- && !DECL_EXTERNAL (node->symbol.decl))
+ if (!node->externally_visible
+ && node->definition && !node->weakref
+ && !DECL_EXTERNAL (node->decl))
{
gcc_assert (whole_program || in_lto_p
- || !TREE_PUBLIC (node->symbol.decl));
- node->symbol.unique_name = ((node->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY
- || node->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY_EXP)
- && TREE_PUBLIC (node->symbol.decl));
- symtab_make_decl_local (node->symbol.decl);
- node->symbol.resolution = LDPR_PREVAILING_DEF_IRONLY;
- if (node->symbol.same_comdat_group)
+ || !TREE_PUBLIC (node->decl));
+ node->unique_name = ((node->resolution == LDPR_PREVAILING_DEF_IRONLY
+ || node->resolution == LDPR_PREVAILING_DEF_IRONLY_EXP)
+ && TREE_PUBLIC (node->decl));
+ symtab_make_decl_local (node->decl);
+ node->resolution = LDPR_PREVAILING_DEF_IRONLY;
+ if (node->same_comdat_group)
/* cgraph_externally_visible_p has already checked all other nodes
in the group and they will all be made local. We need to
dissolve the group at once so that the predicate does not
segfault though. */
- symtab_dissolve_same_comdat_group_list ((symtab_node) node);
+ symtab_dissolve_same_comdat_group_list (node);
}
if (node->thunk.thunk_p
- && TREE_PUBLIC (node->symbol.decl))
+ && TREE_PUBLIC (node->decl))
{
struct cgraph_node *decl_node = node;
@@ -973,16 +973,16 @@ function_and_variable_visibility (bool whole_program)
/* Thunks have the same visibility as function they are attached to.
Make sure the C++ front end set this up properly. */
- if (DECL_ONE_ONLY (decl_node->symbol.decl))
+ if (DECL_ONE_ONLY (decl_node->decl))
{
- gcc_checking_assert (DECL_COMDAT (node->symbol.decl)
- == DECL_COMDAT (decl_node->symbol.decl));
- gcc_checking_assert (DECL_COMDAT_GROUP (node->symbol.decl)
- == DECL_COMDAT_GROUP (decl_node->symbol.decl));
- gcc_checking_assert (node->symbol.same_comdat_group);
+ gcc_checking_assert (DECL_COMDAT (node->decl)
+ == DECL_COMDAT (decl_node->decl));
+ gcc_checking_assert (DECL_COMDAT_GROUP (node->decl)
+ == DECL_COMDAT_GROUP (decl_node->decl));
+ gcc_checking_assert (node->same_comdat_group);
}
- if (DECL_EXTERNAL (decl_node->symbol.decl))
- DECL_EXTERNAL (node->symbol.decl) = 1;
+ if (DECL_EXTERNAL (decl_node->decl))
+ DECL_EXTERNAL (node->decl) = 1;
}
}
FOR_EACH_DEFINED_FUNCTION (node)
@@ -995,9 +995,9 @@ function_and_variable_visibility (bool whole_program)
cheaper and enable more optimization.
TODO: We can also update virtual tables. */
- if (node->callers && can_replace_by_local_alias ((symtab_node)node))
+ if (node->callers && can_replace_by_local_alias (node))
{
- struct cgraph_node *alias = cgraph (symtab_nonoverwritable_alias ((symtab_node) node));
+ struct cgraph_node *alias = cgraph (symtab_nonoverwritable_alias (node));
if (alias && alias != node)
{
@@ -1006,9 +1006,9 @@ function_and_variable_visibility (bool whole_program)
struct cgraph_edge *e = node->callers;
cgraph_redirect_edge_callee (e, alias);
- if (gimple_has_body_p (e->caller->symbol.decl))
+ if (gimple_has_body_p (e->caller->decl))
{
- push_cfun (DECL_STRUCT_FUNCTION (e->caller->symbol.decl));
+ push_cfun (DECL_STRUCT_FUNCTION (e->caller->decl));
cgraph_redirect_edge_call_stmt_to_callee (e);
pop_cfun ();
}
@@ -1019,10 +1019,10 @@ function_and_variable_visibility (bool whole_program)
FOR_EACH_VARIABLE (vnode)
{
/* weak flag makes no sense on local variables. */
- gcc_assert (!DECL_WEAK (vnode->symbol.decl)
- || vnode->symbol.weakref
- || TREE_PUBLIC (vnode->symbol.decl)
- || DECL_EXTERNAL (vnode->symbol.decl));
+ gcc_assert (!DECL_WEAK (vnode->decl)
+ || vnode->weakref
+ || TREE_PUBLIC (vnode->decl)
+ || DECL_EXTERNAL (vnode->decl));
/* In several cases declarations can not be common:
- when declaration has initializer
@@ -1036,39 +1036,39 @@ function_and_variable_visibility (bool whole_program)
static int a __attribute__ ((common))
Canonicalize things here and clear the redundant flag. */
- if (DECL_COMMON (vnode->symbol.decl)
- && (!(TREE_PUBLIC (vnode->symbol.decl)
- || DECL_EXTERNAL (vnode->symbol.decl))
- || (DECL_INITIAL (vnode->symbol.decl)
- && DECL_INITIAL (vnode->symbol.decl) != error_mark_node)
- || DECL_WEAK (vnode->symbol.decl)
- || DECL_SECTION_NAME (vnode->symbol.decl) != NULL
+ if (DECL_COMMON (vnode->decl)
+ && (!(TREE_PUBLIC (vnode->decl)
+ || DECL_EXTERNAL (vnode->decl))
+ || (DECL_INITIAL (vnode->decl)
+ && DECL_INITIAL (vnode->decl) != error_mark_node)
+ || DECL_WEAK (vnode->decl)
+ || DECL_SECTION_NAME (vnode->decl) != NULL
|| ! (ADDR_SPACE_GENERIC_P
- (TYPE_ADDR_SPACE (TREE_TYPE (vnode->symbol.decl))))))
- DECL_COMMON (vnode->symbol.decl) = 0;
+ (TYPE_ADDR_SPACE (TREE_TYPE (vnode->decl))))))
+ DECL_COMMON (vnode->decl) = 0;
}
FOR_EACH_DEFINED_VARIABLE (vnode)
{
- if (!vnode->symbol.definition)
+ if (!vnode->definition)
continue;
if (varpool_externally_visible_p (vnode))
- vnode->symbol.externally_visible = true;
+ vnode->externally_visible = true;
else
{
- vnode->symbol.externally_visible = false;
- vnode->symbol.forced_by_abi = false;
+ vnode->externally_visible = false;
+ vnode->forced_by_abi = false;
}
- if (!vnode->symbol.externally_visible
- && !vnode->symbol.weakref)
+ if (!vnode->externally_visible
+ && !vnode->weakref)
{
- gcc_assert (in_lto_p || whole_program || !TREE_PUBLIC (vnode->symbol.decl));
- vnode->symbol.unique_name = ((vnode->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY
- || vnode->symbol.resolution == LDPR_PREVAILING_DEF_IRONLY_EXP)
- && TREE_PUBLIC (vnode->symbol.decl));
- symtab_make_decl_local (vnode->symbol.decl);
- if (vnode->symbol.same_comdat_group)
- symtab_dissolve_same_comdat_group_list ((symtab_node) vnode);
- vnode->symbol.resolution = LDPR_PREVAILING_DEF_IRONLY;
+ gcc_assert (in_lto_p || whole_program || !TREE_PUBLIC (vnode->decl));
+ vnode->unique_name = ((vnode->resolution == LDPR_PREVAILING_DEF_IRONLY
+ || vnode->resolution == LDPR_PREVAILING_DEF_IRONLY_EXP)
+ && TREE_PUBLIC (vnode->decl));
+ symtab_make_decl_local (vnode->decl);
+ if (vnode->same_comdat_group)
+ symtab_dissolve_same_comdat_group_list (vnode);
+ vnode->resolution = LDPR_PREVAILING_DEF_IRONLY;
}
}
@@ -1081,12 +1081,12 @@ function_and_variable_visibility (bool whole_program)
fprintf (dump_file, "\n\n");
fprintf (dump_file, "\nMarking externally visible functions:");
FOR_EACH_DEFINED_FUNCTION (node)
- if (node->symbol.externally_visible)
+ if (node->externally_visible)
fprintf (dump_file, " %s", cgraph_node_name (node));
fprintf (dump_file, "\n\n");
fprintf (dump_file, "\nMarking externally visible variables:");
FOR_EACH_DEFINED_VARIABLE (vnode)
- if (vnode->symbol.externally_visible)
+ if (vnode->externally_visible)
fprintf (dump_file, " %s", varpool_node_name (vnode));
fprintf (dump_file, "\n\n");
}
@@ -1363,12 +1363,12 @@ static vec<tree> static_dtors;
static void
record_cdtor_fn (struct cgraph_node *node)
{
- if (DECL_STATIC_CONSTRUCTOR (node->symbol.decl))
- static_ctors.safe_push (node->symbol.decl);
- if (DECL_STATIC_DESTRUCTOR (node->symbol.decl))
- static_dtors.safe_push (node->symbol.decl);
- node = cgraph_get_node (node->symbol.decl);
- DECL_DISREGARD_INLINE_LIMITS (node->symbol.decl) = 1;
+ if (DECL_STATIC_CONSTRUCTOR (node->decl))
+ static_ctors.safe_push (node->decl);
+ if (DECL_STATIC_DESTRUCTOR (node->decl))
+ static_dtors.safe_push (node->decl);
+ node = cgraph_get_node (node->decl);
+ DECL_DISREGARD_INLINE_LIMITS (node->decl) = 1;
}
/* Define global constructors/destructor functions for the CDTORS, of
@@ -1522,8 +1522,8 @@ ipa_cdtor_merge (void)
{
struct cgraph_node *node;
FOR_EACH_DEFINED_FUNCTION (node)
- if (DECL_STATIC_CONSTRUCTOR (node->symbol.decl)
- || DECL_STATIC_DESTRUCTOR (node->symbol.decl))
+ if (DECL_STATIC_CONSTRUCTOR (node->decl)
+ || DECL_STATIC_DESTRUCTOR (node->decl))
record_cdtor_fn (node);
build_cdtor_fns ();
static_ctors.release ();