GCC Middle and Back End API Reference
|
#include <cgraph.h>
Data Fields | |
ENUM_BITFIELD(symtab_type) type ENUM_BITFIELD(ld_plugin_symbol_resolution) resolution unsigned | definition: 1 |
unsigned | alias: 1 |
unsigned | weakref: 1 |
unsigned | cpp_implicit_alias: 1 |
unsigned | analyzed: 1 |
unsigned | externally_visible: 1 |
unsigned | force_output: 1 |
unsigned | forced_by_abi: 1 |
unsigned | unique_name: 1 |
unsigned | used_from_other_partition: 1 |
unsigned | in_other_partition: 1 |
unsigned | address_taken: 1 |
int | order |
tree | decl |
symtab_node | next |
symtab_node | previous |
symtab_node | next_sharing_asm_name |
symtab_node | previous_sharing_asm_name |
symtab_node | same_comdat_group |
struct ipa_ref_list | ref_list |
tree | alias_target |
struct lto_file_decl_data * | lto_file_data |
PTR | aux |
Base of all entries in the symbol table. The symtab_node is inherited by cgraph and varpol nodes.
unsigned symtab_node_base::address_taken |
other flags. Set when symbol has address taken.
Referenced by cgraph_set_nothrow_flag_1().
unsigned symtab_node_base::alias |
True when symbol is an alias. Set by assemble_alias.
Referenced by cgraph_create_empty_node(), cgraph_create_function_alias(), contains_hot_call_p(), fixup_same_cpp_alias_visibility(), print_all_lattices(), process_common_attributes(), propagate_aggs_accross_jump_function(), read_inline_edge_summary(), varpool_output_variables(), and varpool_remove_unreferenced_decls().
tree symtab_node_base::alias_target |
Alias target. May be either DECL pointer or ASSEMBLER_NAME pointer depending to what was known to frontend on the creation time. Once alias is resolved, this pointer become NULL.
Referenced by cgraph_create_empty_node(), output_weakrefs(), and varpool_output_variables().
unsigned symtab_node_base::analyzed |
Set once the definition was analyzed. The list of references and other properties are built during analysis.
Referenced by cgraph_process_new_functions(), contains_hot_call_p(), enqueue_node(), lto_output_varpool_node(), gcc::pass_manager::pass_manager(), update_call_expr(), and varpool_remove_unreferenced_decls().
PTR symtab_node_base::aux |
Referenced by ipa_free_postorder_info(), ipa_reverse_postorder(), searchc(), and symtab_remove_unreachable_nodes().
unsigned symtab_node_base::cpp_implicit_alias |
C++ frontend produce same body aliases and extra name aliases for virtual functions and vtables that are obviously equivalent. Those aliases are bit special, especially because C++ frontend visibility code is so ugly it can not get them right at first time and their visibility needs to be copied from their "masters" at the end of parsing.
tree symtab_node_base::decl |
Declaration representing the symbol.
Referenced by assemble_align(), cgraph_call_node_duplication_hooks(), cgraph_can_remove_if_no_direct_calls_and_refs_p(), cgraph_edge_cannot_lead_to_return(), cgraph_materialize_clone(), cgraph_node_cannot_be_local_p_1(), cgraph_set_const_flag_1(), cgraph_set_nothrow_flag_1(), cgraph_unnest_node(), clone_inlined_nodes(), contains_hot_call_p(), debug_symtab(), debug_varpool_node_set(), dump_symtab(), dump_varpool_node_set(), eq_assembler_name(), eq_node(), fixup_same_cpp_alias_visibility(), handle_alias_pairs(), hash_node(), hash_node_by_assembler_name(), init_alias_vars(), input_overwrite_node(), ipa_alloc_node_params(), ipa_analyze_call_uses(), ipa_discover_readonly_nonaddressable_vars(), ipa_reference_get_not_read_global(), ipa_reverse_postorder(), lower_emutls_phi_arg(), lto_out_decl_state_written_size(), lto_output_varpool_node(), output_weakrefs(), gcc::pass_manager::pass_manager(), predicate_for_phi_result(), process_common_attributes(), process_function_and_variable_attributes(), remove_preds_and_fake_succs(), report_inline_failed_reason(), save_debug_info_for_decl(), set_reference_optimization_summary(), spread_undeadness(), symtab_dissolve_same_comdat_group_list(), symtab_nonoverwritable_alias(), varpool_node_for_decl(), varpool_output_variables(), varpool_remove_initializer(), varpool_remove_unreferenced_decls(), walk_all_functions(), walk_polymorphic_call_targets(), and write_symbol().
ENUM_BITFIELD (symtab_type) type ENUM_BITFIELD (ld_plugin_symbol_resolution) resolution unsigned symtab_node_base::definition |
Type of the symbol. The symbols resolution. Flags representing the symbol type. True when symbol corresponds to a definition in current unit. set via cgraph_finalize_function or varpool_finalize_decl
Referenced by cgraph_create_empty_node(), cgraph_create_function_alias(), clone_inlined_nodes(), comp_type_attributes(), declare_weak(), dump_varpool_node_set(), lto_output_varpool_node(), maybe_record_node(), process_common_attributes(), propagate_aggs_accross_jump_function(), read_inline_edge_summary(), symtab_remove_unreachable_nodes(), type_tag(), update_call_expr(), varpool_finalize_decl(), varpool_output_variables(), and walk_polymorphic_call_targets().
unsigned symtab_node_base::externally_visible |
Visibility and linkage flags. Set when function is visible by other units.
Referenced by cgraph_unnest_node(), clone_inlined_nodes(), function_and_variable_visibility(), init_alias_vars(), and update_call_expr().
unsigned symtab_node_base::force_output |
The symbol will be assumed to be used in an invisiable way (like by an toplevel asm statement).
Referenced by cgraph_node_remove_callees(), and init_alias_vars().
unsigned symtab_node_base::forced_by_abi |
Like FORCE_OUTPUT, but in the case it is ABI requiring the symbol to be exported. Unlike FORCE_OUTPUT this flag gets cleared to symbols promoted to static and it does not inhibit optimization.
Referenced by cgraph_node_remove_callees(), cgraph_unnest_node(), and function_and_variable_visibility().
unsigned symtab_node_base::in_other_partition |
Set when function is available in the other LTRANS partition. During WPA output it is used to mark nodes that are present in multiple partitions.
Referenced by symtab_remove_unreachable_nodes().
struct lto_file_decl_data* symtab_node_base::lto_file_data |
File stream where this node is being written to.
Referenced by debug_varpool_node_set(), and remap_hint_predicate().
symtab_node symtab_node_base::next |
Linked list of symbol table entries starting with symtab_nodes.
Referenced by cgraph_node_remove_callees(), comdat_can_be_unshared_p_1(), enqueue_node(), and symtab_add_to_same_comdat_group().
symtab_node symtab_node_base::next_sharing_asm_name |
Linked list of symbols with the same asm name. There may be multiple entries for single symbol name during LTO, because symbols are renamed only after partitioning.
Because inline clones are kept in the assembler name has, they also produce duplicate entries.
There are also several long standing bugs where frontends and builtin code produce duplicated decls.
Referenced by eq_assembler_name().
int symtab_node_base::order |
Ordering of all symtab entries.
Referenced by cgraph_edge_remove_caller(), free_varpool_node_set(), input_overwrite_node(), known_aggs_to_agg_replacement_list(), possible_polymorphic_call_target_p(), print_all_lattices(), remove_node_data(), and want_early_inline_function_p().
symtab_node symtab_node_base::previous |
symtab_node symtab_node_base::previous_sharing_asm_name |
Referenced by eq_assembler_name().
struct ipa_ref_list symtab_node_base::ref_list |
Vectors of referring and referenced entities.
Referenced by dump_cgraph(), ipa_find_reference(), ipa_record_reference(), ipa_ref_has_aliases_p(), ipa_ref_referring_ref_list(), ipa_ref_referring_varpool_node(), ipa_remove_stmt_references(), lto_out_decl_state_written_size(), lto_output_varpool_node(), symtab_insert_node_to_hashtable(), symtab_resolve_alias(), and varpool_create_variable_alias().
symtab_node symtab_node_base::same_comdat_group |
Circular list of nodes in the same comdat group if non-NULL.
Referenced by comdat_can_be_unshared_p_1(), enqueue_node(), symtab_add_to_same_comdat_group(), and symtab_insert_node_to_hashtable().
unsigned symtab_node_base::unique_name |
True when the name is known to be unique and thus it does not need mangling.
Referenced by cgraph_unnest_node().
unsigned symtab_node_base::used_from_other_partition |
WHOPR Partitioning flags. These flags are used at ltrans stage when only part of the callgraph is available. Set when variable is used from other LTRANS partition.
Referenced by init_alias_vars().
unsigned symtab_node_base::weakref |
True when alias is a weakref.
Referenced by cgraph_create_empty_node(), and varpool_output_variables().