GCC Middle and Back End API Reference
symtab_node Struct Reference

#include <cgraph.h>

Inheritance diagram for symtab_node:
Collaboration diagram for symtab_node:

Public Member Functions

 symtab_node (symtab_type t)
 
const charname () const
 
const chardump_name () const
 
const charasm_name () const
 
const chardump_asm_name () const
 
const charget_visibility_string () const
 
const charget_symtab_type_string () const
 
void register_symbol (void)
 
void remove (void)
 
void reset (bool preserve_comdat_group=false)
 
void dump (FILE *f)
 
void dump_graphviz (FILE *f)
 
void DEBUG_FUNCTION debug (void)
 
void DEBUG_FUNCTION verify (void)
 
ipa_refcreate_reference (symtab_node *referred_node, enum ipa_ref_use use_type)
 
ipa_refcreate_reference (symtab_node *referred_node, enum ipa_ref_use use_type, gimple *stmt)
 
ipa_refmaybe_create_reference (tree val, gimple *stmt)
 
void clone_references (symtab_node *node)
 
void clone_referring (symtab_node *node)
 
ipa_refclone_reference (ipa_ref *ref, gimple *stmt)
 
ipa_reffind_reference (symtab_node *referred_node, gimple *stmt, unsigned int lto_stmt_uid, enum ipa_ref_use use_type)
 
void remove_stmt_references (gimple *stmt)
 
void clear_stmts_in_references (void)
 
void remove_all_references (void)
 
void remove_all_referring (void)
 
void dump_references (FILE *file)
 
void dump_referring (FILE *)
 
unsigned num_references (void)
 
ipa_refiterate_reference (unsigned i, ipa_ref *&ref)
 
ipa_refiterate_referring (unsigned i, ipa_ref *&ref)
 
ipa_refiterate_direct_aliases (unsigned i, ipa_ref *&ref)
 
bool semantically_equivalent_p (symtab_node *target)
 
enum symbol_partitioning_class get_partitioning_class (void)
 
tree get_comdat_group ()
 
tree get_comdat_group_id ()
 
void set_comdat_group (tree group)
 
const charget_section () const
 
void remove_from_same_comdat_group (void)
 
void add_to_same_comdat_group (symtab_node *old_node)
 
void dissolve_same_comdat_group_list (void)
 
bool used_from_object_file_p (void)
 
symtab_nodeultimate_alias_target (enum availability *avail=NULL, struct symtab_node *ref=NULL)
 
symtab_nodenext_defined_symbol (void)
 
bool resolve_alias (symtab_node *target, bool transparent=false)
 
void fixup_same_cpp_alias_visibility (symtab_node *target)
 
bool call_for_symbol_and_aliases (bool(*callback)(symtab_node *, void *), void *data, bool include_overwrite)
 
symtab_nodenoninterposable_alias (void)
 
symtab_nodeget_alias_target (void)
 
tree get_alias_target_tree ()
 
void set_section (const char *section)
 
void set_section (const symtab_node &other)
 
void set_section_for_node (const char *section)
 
void set_section_for_node (const symtab_node &other)
 
void set_init_priority (priority_type priority)
 
priority_type get_init_priority ()
 
enum availability get_availability (symtab_node *ref=NULL)
 
bool prevailing_p (void)
 
bool binds_to_current_def_p (symtab_node *ref=NULL)
 
void make_decl_local (void)
 
void copy_visibility_from (symtab_node *n)
 
unsigned int definition_alignment ()
 
bool can_increase_alignment_p ()
 
void increase_alignment (unsigned int align)
 
bool has_aliases_p (void)
 
bool real_symbol_p (void)
 
bool output_to_lto_symbol_table_p (void)
 
bool needed_p (void)
 
bool native_rtl_p () const
 
bool referred_to_p (bool include_self=true)
 
bool can_be_discarded_p (void)
 
bool comdat_local_p (void)
 
bool in_same_comdat_group_p (symtab_node *target)
 
bool nonzero_address ()
 
int equal_address_to (symtab_node *s2, bool memory_accessed=false)
 
bool address_matters_p ()
 
bool address_can_be_compared_p (void)
 

Static Public Member Functions

static symtab_nodeget (const_tree decl)
 
static symtab_nodeget_create (tree node)
 
static symtab_nodeget_for_asmname (const_tree asmname)
 
static void check_ifunc_callee_symtab_nodes (void)
 
static DEBUG_FUNCTION void verify_symtab_nodes (void)
 
static void checking_verify_symtab_nodes (void)
 

Data Fields

enum symtab_type type: 8
 
enum ld_plugin_symbol_resolution resolution: 8
 
unsigned definition: 1
 
unsigned alias: 1
 
unsigned transparent_alias: 1
 
unsigned weakref: 1
 
unsigned cpp_implicit_alias: 1
 
unsigned symver: 1
 
unsigned analyzed: 1
 
unsigned writeonly: 1
 
unsigned refuse_visibility_changes: 1
 
unsigned externally_visible: 1
 
unsigned no_reorder: 1
 
unsigned force_output: 1
 
unsigned forced_by_abi: 1
 
unsigned unique_name: 1
 
unsigned implicit_section: 1
 
unsigned body_removed: 1
 
unsigned semantic_interposition: 1
 
unsigned used_from_other_partition: 1
 
unsigned in_other_partition: 1
 
unsigned address_taken: 1
 
unsigned in_init_priority_hash: 1
 
unsigned need_lto_streaming: 1
 
unsigned offloadable: 1
 
unsigned ifunc_resolver: 1
 
int order
 
tree decl
 
symtab_nodenext
 
symtab_nodeprevious
 
symtab_nodenext_sharing_asm_name
 
symtab_nodeprevious_sharing_asm_name
 
symtab_nodesame_comdat_group
 
ipa_ref_list ref_list
 
tree alias_target
 
struct lto_file_decl_datalto_file_data
 
voidaux
 
tree x_comdat_group
 
section_hash_entryx_section
 

Protected Member Functions

void dump_base (FILE *)
 
bool DEBUG_FUNCTION verify_base (void)
 
void unregister (struct clone_info *)
 
struct symbol_priority_mappriority_info (void)
 
bool call_for_symbol_and_aliases_1 (bool(*callback)(symtab_node *, void *), void *data, bool include_overwrite)
 

Private Member Functions

symtab_nodeultimate_alias_target_1 (enum availability *avail=NULL, symtab_node *ref=NULL)
 
const charget_dump_name (bool asm_name_p) const
 

Static Private Member Functions

static bool set_section_from_string (symtab_node *n, void *s)
 
static bool set_section_from_node (symtab_node *n, void *o)
 
static bool set_implicit_section (symtab_node *n, void *)
 
static bool noninterposable_alias (symtab_node *node, void *data)
 

Friends

class symbol_table
 

Detailed Description

Base of all entries in the symbol table.
The symtab_node is inherited by cgraph and varpol nodes.   

Constructor & Destructor Documentation

◆ symtab_node()

symtab_node::symtab_node ( symtab_type t)
inlineexplicit

Member Function Documentation

◆ add_to_same_comdat_group()

◆ address_can_be_compared_p()

bool symtab_node::address_can_be_compared_p ( void )

◆ address_matters_p()

bool symtab_node::address_matters_p ( )
Return true if symbol's address may possibly be compared to other
symbol's address.   

References address_matters_1(), alias, call_for_symbol_and_aliases(), gcc_assert, and NULL.

Referenced by ipa_icf::sem_function::merge(), and ipa_icf::sem_variable::merge().

◆ asm_name()

const char * symtab_node::asm_name ( ) const
Return printable assembler name of NODE.
This function is used only for debugging.  When assembler name
is unknown go with identifier name.   

References DECL_ASSEMBLER_NAME, DECL_ASSEMBLER_NAME_SET_P, IDENTIFIER_POINTER, and name().

Referenced by dump_callgraph_transformation(), get_dump_name(), name(), and cgraph_node::remove().

◆ binds_to_current_def_p()

◆ call_for_symbol_and_aliases()

bool symtab_node::call_for_symbol_and_aliases ( bool(*)(symtab_node *, void *) callback,
void * data,
bool include_overwritable )
inline
Call callback on symtab node and aliases associated to this node.
When INCLUDE_OVERWRITABLE is false, overwritable symbols are skipped.  

References AVAIL_INTERPOSABLE, call_for_symbol_and_aliases_1(), get_availability(), ggc_alloc(), and has_aliases_p().

Referenced by address_matters_p(), definition_alignment(), increase_alignment(), ipa_comdats(), noninterposable_alias(), resolve_alias(), resolve_unique_section(), set_section(), and set_section().

◆ call_for_symbol_and_aliases_1()

bool symtab_node::call_for_symbol_and_aliases_1 ( bool(*)(symtab_node *, void *) callback,
void * data,
bool include_overwritable )
protected
Worker for call_for_symbol_and_aliases.   

References alias, AVAIL_INTERPOSABLE, FOR_EACH_ALIAS, ggc_alloc(), and ipa_ref::referring.

Referenced by call_for_symbol_and_aliases().

◆ can_be_discarded_p()

◆ can_increase_alignment_p()

◆ check_ifunc_callee_symtab_nodes()

void symtab_node::check_ifunc_callee_symtab_nodes ( void )
static

◆ checking_verify_symtab_nodes()

void symtab_node::checking_verify_symtab_nodes ( void )
inlinestatic

◆ clear_stmts_in_references()

void symtab_node::clear_stmts_in_references ( void )
Remove all stmt references in non-speculative references in THIS
and all clones.
Those are not maintained during inlining & cloning.
The exception are speculative references that are updated along
with callgraph edges associated with them.   

References ggc_alloc(), i, iterate_reference(), NULL, r, and ipa_ref::stmt.

Referenced by inline_transform(), and cgraph_node::materialize_clone().

◆ clone_reference()

ipa_ref * symtab_node::clone_reference ( ipa_ref * ref,
gimple * stmt )
Clone reference REF to this symtab_node and set its stmt to STMT.   

References create_reference(), ggc_alloc(), ipa_ref::lto_stmt_uid, ipa_ref::referred, ipa_ref::speculative, ipa_ref::speculative_id, and ipa_ref::use.

Referenced by ipa_edge_args_sum_t::duplicate().

◆ clone_references()

void symtab_node::clone_references ( symtab_node * node)

◆ clone_referring()

void symtab_node::clone_referring ( symtab_node * node)

◆ comdat_local_p()

◆ copy_visibility_from()

◆ create_reference() [1/2]

ipa_ref * symtab_node::create_reference ( symtab_node * referred_node,
enum ipa_ref_use use_type )

◆ create_reference() [2/2]

ipa_ref * symtab_node::create_reference ( symtab_node * referred_node,
enum ipa_ref_use use_type,
gimple * stmt )
Return ipa reference from this symtab_node to
REFERRED_NODE or REFERRED_VARPOOL_NODE. USE_TYPE specify type
of the use and STMT the statement (if it exists).   

References gcc_checking_assert, ggc_alloc(), i, IPA_REF_ALIAS, iterate_reference(), ipa_ref::lto_stmt_uid, NULL, ref_list, ipa_ref_list::references, ipa_ref::referred, ipa_ref::referred_index, ipa_ref::referring, ipa_ref::speculative, ipa_ref::speculative_id, ipa_ref::stmt, and ipa_ref::use.

◆ debug()

DEBUG_FUNCTION void symtab_node::debug ( void )
Dump symtab node NODE to stderr.   

References dump(), and ggc_alloc().

Referenced by verify(), and verify_symtab_nodes().

◆ definition_alignment()

unsigned int symtab_node::definition_alignment ( )
Return desired alignment of the definition.  This is NOT alignment useful
to access THIS, because THIS may be interposable and DECL_ALIGN should
be used instead.  It however must be guaranteed when output definition
of THIS.   

References alias, call_for_symbol_and_aliases(), gcc_assert, and get_alignment_1().

Referenced by assemble_start_function(), build_constant_desc(), emit_local(), function_section_1(), and output_constant_def_contents().

◆ dissolve_same_comdat_group_list()

void symtab_node::dissolve_same_comdat_group_list ( void )
Dissolve the same_comdat_group list in which NODE resides.   

References decl, ggc_alloc(), next, NULL, same_comdat_group, set_comdat_group(), and TREE_PUBLIC.

Referenced by function_and_variable_visibility(), localize_node(), and update_visibility_by_resolution_info().

◆ dump()

void symtab_node::dump ( FILE * f)
Dump symtab node to F.   

References ggc_alloc().

Referenced by debug(), symbol_table::dump(), ipa_comdats(), and verify_base().

◆ dump_asm_name()

◆ dump_base()

◆ dump_graphviz()

void symtab_node::dump_graphviz ( FILE * f)

References ggc_alloc().

Referenced by symbol_table::dump_graphviz().

◆ dump_name()

const char * symtab_node::dump_name ( ) const

References get_dump_name().

Referenced by adjust_references_in_caller(), analyze_function(), analyze_function_body(), analyze_functions(), call_may_clobber_ref_p_1(), copy_bb(), create_specialized_node(), decide_about_value(), decide_whether_version_node(), determine_versionability(), drop_profile(), cgraph_node::dump(), speculative_call_summary::dump(), ipa_icf::sem_item::dump(), cgraph_node::dump_graphviz(), dump_ipa_call_summary(), dump_malloc_lattice(), dump_modref_edge_summaries(), dump_profile_updates(), ipa_icf::sem_function::equals(), ipa_icf::sem_variable::equals(), estimate_local_effects(), ipa_call_context::estimate_size_and_time(), function_and_variable_visibility(), generate_summary(), cgraph_node::get_create(), identify_dead_nodes(), init_node_map(), initialize_node_lattices(), inline_analyze_function(), inline_call(), inline_small_functions(), inline_to_all_callers_1(), ipa_devirt(), ipa_dump_fn_summary(), ipa_impossible_devirt_target(), ipa_inline(), ipa_make_edge_direct_to_target(), ipa_make_function_const(), ipa_make_function_pure(), ipa_merge_modref_summary_after_inlining(), ipa_merge_profiles(), ipa_print_node_jump_functions(), ipa_print_node_params(), ipa_profile(), ipa_profile_dump_all_summaries(), ipa_propagate_frequency(), ipa_pta_execute(), ipa_single_use(), ipcp_cloning_candidate_p(), ipcp_store_vr_results(), ipcp_transform_function(), make_item_for_dump_symtab_node(), cgraph_edge::make_speculative(), cgraph_node::materialize_clone(), ipa_icf::sem_item_optimizer::merge_classes(), optimize_weakref(), output_constructor(), output_function(), perhaps_add_new_callers(), print_all_lattices(), propagate(), propagate_bits_across_jump_function(), propagate_controlled_uses(), propagate_malloc(), propagate_pure_const(), pure_const_read_summary(), read_write_all_from_decl(), recursive_inlining(), cgraph_edge::redirect_call_stmt_to_callee(), ref_maybe_used_by_call_p_1(), remove_described_reference(), symbol_table::remove_unreachable_nodes(), cgraph_edge::resolve_speculation(), save_inline_function_body(), stmt_kills_ref_p(), verify_speculative_call(), walk_polymorphic_call_targets(), walk_polymorphic_call_targets(), and worse_state().

◆ dump_references()

void symtab_node::dump_references ( FILE * file)
Dump references in ref list to FILE.   

References dump_asm_name(), ggc_alloc(), i, ipa_ref_use_name, iterate_reference(), NULL, ipa_ref::referred, ipa_ref::speculative, and ipa_ref::use.

Referenced by dump_base().

◆ dump_referring()

void symtab_node::dump_referring ( FILE * file)

◆ equal_address_to()

int symtab_node::equal_address_to ( symtab_node * s2,
bool memory_accessed = false )
Return 0 if symbol is known to have different address than S2,
Return 1 if symbol is known to have same address as S2,
return -1 otherwise.  

If MEMORY_ACCESSED is true, assume that both memory pointer to THIS
and S2 is going to be accessed.  This eliminates the situations when
either THIS or S2 is NULL and is useful for comparing bases when deciding
about memory aliasing.   

References analyzed, AVAIL_AVAILABLE, DECL_ATTRIBUTES, decl_binds_to_current_def_p(), DECL_VIRTUAL_P, equal_address_to(), folding_initializer, get_alias_target(), ggc_alloc(), lookup_attribute(), nonzero_address(), refuse_visibility_changes, transparent_alias, TREE_CODE, ultimate_alias_target(), and VAR_P.

Referenced by ipa_icf::sem_item::compare_symbol_references(), and equal_address_to().

◆ find_reference()

ipa_ref * symtab_node::find_reference ( symtab_node * referred_node,
gimple * stmt,
unsigned int lto_stmt_uid,
enum ipa_ref_use use_type )
Find the structure describing a reference to REFERRED_NODE of USE_TYPE and
associated with statement STMT or LTO_STMT_UID.   

References ggc_alloc(), i, iterate_reference(), NULL, and r.

Referenced by adjust_references_in_caller(), ipa_edge_args_sum_t::duplicate(), ipcp_discover_new_direct_edges(), propagate_controlled_uses(), and remove_described_reference().

◆ fixup_same_cpp_alias_visibility()

void symtab_node::fixup_same_cpp_alias_visibility ( symtab_node * target)
C++ FE sometimes change linkage flags after producing same body aliases.

FIXME: C++ produce implicit aliases for virtual functions and vtables that
are obviously equivalent.  The way it is doing so is however somewhat
kludgy and interferes with the visibility code. As a result we need to
copy the visibility from the target to get things right.   

References add_to_same_comdat_group(), decl, DECL_COMDAT, DECL_DECLARED_INLINE_P, DECL_DISREGARD_INLINE_LIMITS, DECL_EXTERNAL, DECL_VISIBILITY, DECL_WEAK, externally_visible, get_comdat_group(), ggc_alloc(), same_comdat_group, set_comdat_group(), and TREE_PUBLIC.

Referenced by analyze_functions(), and resolve_alias().

◆ get()

static symtab_node * symtab_node::get ( const_tree decl)
inlinestatic

◆ get_alias_target()

◆ get_alias_target_tree()

tree symtab_node::get_alias_target_tree ( )
inline
Return the DECL (or identifier) that alias is aliasing.  Unlike the above,
this works whether or not the alias has been analyzed already.   

References alias_target, decl, and get_alias_target().

Referenced by process_function_and_variable_attributes().

◆ get_availability()

◆ get_comdat_group()

◆ get_comdat_group_id()

tree symtab_node::get_comdat_group_id ( )
inline

◆ get_create()

symtab_node * symtab_node::get_create ( tree node)
inlinestatic
Return symtab_node for NODE or create one if it is not present
in symtab.   

References varpool_node::get_create(), cgraph_node::get_create(), and VAR_P.

Referenced by address_compare(), compare_base_symbol_refs(), maybe_nonzero_address(), and process_symver_attribute().

◆ get_dump_name()

const char * symtab_node::get_dump_name ( bool asm_name_p) const
private

◆ get_for_asmname()

◆ get_init_priority()

◆ get_partitioning_class()

◆ get_section()

◆ get_symtab_type_string()

const char * symtab_node::get_symtab_type_string ( ) const
Dump the type_name of the symbol.   

References symtab_type_names, and type.

◆ get_visibility_string()

const char * symtab_node::get_visibility_string ( ) const
Dump the visibility of the symbol.   

References DECL_VISIBILITY, and ggc_alloc().

◆ has_aliases_p()

◆ in_same_comdat_group_p()

bool symtab_node::in_same_comdat_group_p ( symtab_node * target)
inline

◆ increase_alignment()

void symtab_node::increase_alignment ( unsigned int align)

◆ iterate_direct_aliases()

ipa_ref * symtab_node::iterate_direct_aliases ( unsigned i,
ipa_ref *& ref )
inline

◆ iterate_reference()

◆ iterate_referring()

◆ make_decl_local()

◆ maybe_create_reference()

◆ name()

◆ native_rtl_p()

bool symtab_node::native_rtl_p ( ) const
Return true if this symbol is a function from the C frontend specified
directly in RTL form (with "__RTL").   

References DECL_STRUCT_FUNCTION, ggc_alloc(), PROP_rtl, and TREE_CODE.

Referenced by cgraph_node::analyze(), cgraph_node::expand(), cgraph_node::finalize_function(), and needed_p().

◆ needed_p()

bool symtab_node::needed_p ( void )
Determine if symbol declaration is needed.  That is, visible to something
either outside this translation unit, something magic in the system
configury  

References DECL_ASSEMBLER_NAME, DECL_ASSEMBLER_NAME_SET_P, DECL_COMDAT, DECL_EXTERNAL, DECL_STATIC_CONSTRUCTOR, DECL_STATIC_DESTRUCTOR, definition, force_output, forced_by_abi, gcc_checking_assert, ggc_alloc(), native_rtl_p(), TREE_CODE, TREE_PUBLIC, and TREE_SYMBOL_REFERENCED.

Referenced by analyze_functions(), varpool_node::finalize_decl(), and cgraph_node::finalize_function().

◆ next_defined_symbol()

symtab_node * symtab_node::next_defined_symbol ( void )
inline
Return next reachable static symbol with initializer after the node.   

References ggc_alloc(), next, and NULL.

◆ noninterposable_alias() [1/2]

bool symtab_node::noninterposable_alias ( symtab_node * node,
void * data )
staticprivate

◆ noninterposable_alias() [2/2]

◆ nonzero_address()

◆ num_references()

unsigned symtab_node::num_references ( void )
inline

◆ output_to_lto_symbol_table_p()

bool symtab_node::output_to_lto_symbol_table_p ( void )

◆ prevailing_p()

bool symtab_node::prevailing_p ( void )
inline
During LTO stream-in this predicate can be used to check whether node
in question prevails in the linking to save some memory usage.   

References DECL_EXTERNAL, definition, NULL, previous_sharing_asm_name, and TREE_PUBLIC.

Referenced by inline_read_section(), ipa_read_node_info(), and cgraph_edge::possibly_call_in_translation_unit_p().

◆ priority_info()

symbol_priority_map * symtab_node::priority_info ( void )
protected
Return the initialization and finalization priority information for
DECL.  If there is no previous priority information, a freshly
allocated structure is returned.   

References hash_map< KeyId, Value, Traits >::create_ggc(), DEFAULT_INIT_PRIORITY, hash_map< KeyId, Value, Traits >::get_or_insert(), ggc_alloc(), in_init_priority_hash, symbol_table::init_priority_hash, and symtab.

Referenced by cgraph_node::set_fini_priority(), and set_init_priority().

◆ real_symbol_p()

bool symtab_node::real_symbol_p ( void )
inline
Return true when the symbol is real symbol, i.e. it is not inline clone
or abstract function kept for debug info purposes only.   

References DECL_ABSTRACT_P, definition, ggc_alloc(), and transparent_alias.

Referenced by build_type_inheritance_graph(), ipa_comdats(), output_to_lto_symbol_table_p(), set_comdat_group(), and update_type_inheritance_graph().

◆ referred_to_p()

bool symtab_node::referred_to_p ( bool include_self = true)
Return true when there are references to the node.  INCLUDE_SELF is
true if a self reference counts as a reference.   

References ggc_alloc(), iterate_referring(), and NULL.

Referenced by analyze_functions(), varpool_node::finalize_decl(), and cgraph_node::finalize_function().

◆ register_symbol()

void symtab_node::register_symbol ( void )
Add node into symbol table.  This function is not used directly, but via
cgraph/varpool node creation routines.   

References ipa_ref_list::clear(), symbol_table::insert_to_assembler_name_hash(), ref_list, symbol_table::register_symbol(), and symtab.

Referenced by cgraph_node::create(), cgraph_node::create_clone(), varpool_node::get_create(), input_node(), and input_varpool_node().

◆ remove()

void symtab_node::remove ( void )
Remove symbol from symbol table.   

References ggc_alloc().

Referenced by analyze_functions(), and symbol_table::remove_unreachable_nodes().

◆ remove_all_references()

◆ remove_all_referring()

void symtab_node::remove_all_referring ( void )
Remove all referring items in ref list.   

References ref_list, and ipa_ref_list::referring.

Referenced by unregister().

◆ remove_from_same_comdat_group()

void symtab_node::remove_from_same_comdat_group ( void )
Remove NODE from same comdat group.    

References NULL, same_comdat_group, and set_comdat_group().

Referenced by clone_inlined_nodes(), reset(), resolve_alias(), and unregister().

◆ remove_stmt_references()

void symtab_node::remove_stmt_references ( gimple * stmt)
Remove all references that are associated with statement STMT.   

References i, iterate_reference(), NULL, r, and ipa_ref::remove_reference().

Referenced by delete_unreachable_blocks_update_callgraph().

◆ reset()

void symtab_node::reset ( bool preserve_comdat_group = false)
As an GCC extension we allow redefinition of the function.  The
semantics when both copies of bodies differ is not well defined.
We replace the old body with new body so in unit at a time mode
we always use new body, while in normal mode we may end up with
old body inlined into some functions and new body expanded and
inlined in others.

??? It may make more sense to use one body for inlining and other
body for expanding the function but this is difficult to do.

This is also used to cancel C++ mangling aliases, which can be for
functions or variables.   

References alias, analyzed, cpp_implicit_alias, definition, gcc_assert, ggc_alloc(), NULL, remove_all_references(), remove_from_same_comdat_group(), transparent_alias, and weakref.

Referenced by cgraph_node::create_thunk(), cgraph_node::create_wrapper(), cgraph_node::finalize_function(), handle_alias_pairs(), and ipa_icf::sem_function::merge().

◆ resolve_alias()

◆ semantically_equivalent_p()

bool symtab_node::semantically_equivalent_p ( symtab_node * target)
Return true if symtab node and TARGET represents
semantically equivalent symbols.   

References AVAIL_AVAILABLE, decl, ggc_alloc(), and ultimate_alias_target().

Referenced by ipa_icf::sem_item::compare_symbol_references(), cgraph_edge::make_direct(), possible_polymorphic_call_target_p(), and cgraph_edge::resolve_speculation().

◆ set_comdat_group()

◆ set_implicit_section()

bool symtab_node::set_implicit_section ( symtab_node * n,
void * data )
staticprivate
Worker for symtab_resolve_alias.   

References implicit_section.

Referenced by resolve_alias().

◆ set_init_priority()

void symtab_node::set_init_priority ( priority_type priority)
Set initialization priority to PRIORITY.   

References DECL_STATIC_CONSTRUCTOR, DEFAULT_INIT_PRIORITY, gcc_assert, get_init_priority(), ggc_alloc(), and priority_info().

Referenced by input_node().

◆ set_section() [1/2]

◆ set_section() [2/2]

void symtab_node::set_section ( const symtab_node & other)

◆ set_section_for_node() [1/2]

◆ set_section_for_node() [2/2]

void symtab_node::set_section_for_node ( const symtab_node & other)
Set the section of node THIS to be the same as the section
of node OTHER.  Keep reference counts of the sections
up-to-date as needed.   

References gcc_checking_assert, get_section(), ggc_alloc(), implicit_section, NULL, release_section_hash_entry(), retain_section_hash_entry(), and x_section.

◆ set_section_from_node()

bool symtab_node::set_section_from_node ( symtab_node * n,
void * o )
staticprivate
Set the section of node N to be the same as the section
of node O.   

References ggc_alloc(), and set_section_for_node().

Referenced by set_section().

◆ set_section_from_string()

bool symtab_node::set_section_from_string ( symtab_node * n,
void * s )
staticprivate
Workers for set_section.   

References set_section_for_node().

Referenced by set_section().

◆ ultimate_alias_target()

◆ ultimate_alias_target_1()

symtab_node * symtab_node::ultimate_alias_target_1 ( enum availability * availability = NULL,
symtab_node * ref = NULL )
private
Walk the alias chain to return the symbol NODE is alias of.
If NODE is not an alias, return NODE.
Assumes NODE is known to be alias.   

References alias, analyzed, AVAIL_NOT_AVAILABLE, get_alias_target(), get_availability(), ggc_alloc(), NULL, and transparent_alias.

Referenced by ultimate_alias_target().

◆ unregister()

void symtab_node::unregister ( struct clone_info * info)
protected
Remove node from symbol table.  This function is not used directly, but via
cgraph/varpool node removal routines.
INFO is a clone info to attach to new root of clone tree (if any).   

References DECL_HARD_REGISTER, gcc_assert, ggc_alloc(), in_init_priority_hash, symbol_table::init_priority_hash, NULL, hash_map< KeyId, Value, Traits >::remove(), remove_all_references(), remove_all_referring(), remove_from_same_comdat_group(), set_section_for_node(), symtab, symbol_table::unlink_from_assembler_name_hash(), and symbol_table::unregister().

Referenced by cgraph_node::remove(), and varpool_node::remove().

◆ used_from_object_file_p()

bool symtab_node::used_from_object_file_p ( void )
inline

◆ verify()

◆ verify_base()

◆ verify_symtab_nodes()

Friends And Related Symbol Documentation

◆ symbol_table

Field Documentation

◆ address_taken

◆ alias

unsigned symtab_node::alias

Referenced by cgraph_node::add_detected_attribute(), address_matters_p(), cgraph_node::analyze(), varpool_node::analyze(), analyze_function(), analyze_functions(), assemble_alias(), varpool_node::assemble_aliases(), varpool_node::assemble_decl(), cgraph_node::assemble_thunks_and_aliases(), associate_varinfo_to_alias(), cgraph_node::call_for_symbol_and_aliases_1(), call_for_symbol_and_aliases_1(), varpool_node::call_for_symbol_and_aliases_1(), cgraph_node::call_for_symbol_thunks_and_aliases(), cgraph_node::can_remove_if_no_direct_calls_p(), can_remove_node_now_p(), clone_inlined_nodes(), symbol_table::compile(), compute_ltrans_boundary(), copy_visibility_from(), cgraph_node::create_alias(), varpool_node::create_alias(), create_emultls_var(), varpool_node::create_extra_name_alias(), cgraph_node::create_same_body_alias(), cgraph_node::create_thunk(), ctor_for_folding(), definition_alignment(), determine_versionability(), dump_base(), dump_overall_stats(), expand_target_clones(), varpool_node::finalize_named_section_flags(), function_and_variable_visibility(), generate_summary(), get_constraint_for_ssa_var(), get_partitioning_class(), handle_alias_pairs(), cgraph_node::has_gimple_body_p(), initialize_node_lattices(), inline_call(), inline_small_functions(), input_node(), input_overwrite_node(), input_varpool_node(), ipa_comdats(), ipa_devirt(), ipa_fn_summary_generate(), ipa_inline(), ipa_lower_emutls(), ipa_merge_profiles(), ipa_profile(), ipa_propagate_frequency(), ipa_pta_execute(), ipa_reverse_postorder(), ipa_strub_set_mode_for_new_functions(), ipa_tm_execute(), ipa_tm_mayenterirr_function(), ipa_write_summaries(), ipcp_propagate_stage(), localize_node(), lto_output_node(), lto_output_varpool_node(), make_decl_local(), mark_functions_to_output(), ipa_icf::sem_variable::merge(), noninterposable_alias(), nonzero_address(), omp_discover_declare_target_tgt_fn_r(), optimize_weakref(), output_refs(), symbol_table::output_weakrefs(), ipa_icf::sem_variable::parse(), preserve_function_body_p(), process_function_and_variable_attributes(), process_references(), propagate(), propagate_malloc(), propagate_nothrow(), propagate_pure_const(), recursive_call_p(), symbol_table::remove_unreachable_nodes(), reset(), resolve_alias(), cgraph_node::set_const_flag(), cgraph_node::set_malloc_flag(), cgraph_node::set_noreturn_flag(), cgraph_node::set_nothrow_flag(), set_section(), set_strub_mode(), set_strub_mode_to(), ultimate_alias_target(), ultimate_alias_target_1(), ultimate_transparent_alias_target(), update_caller_keys(), verify_base(), cgraph_node::verify_node(), walk_polymorphic_call_targets(), want_inline_function_to_all_callers_p(), cgraph_node::will_be_removed_from_program_if_no_direct_calls_p(), and wrapup_global_declaration_2().

◆ alias_target

◆ analyzed

◆ aux

◆ body_removed

◆ cpp_implicit_alias

◆ decl

tree symtab_node::decl

Referenced by add_detected_attribute_1(), ipcp_lattice< valtype >::add_value(), ipa_ref::address_matters_p(), cgraph_node::analyze(), analyze_function(), analyze_function(), analyze_function_body(), analyze_functions(), assemble_alias(), assemble_variable_contents(), associate_varinfo_to_alias(), autofdo::auto_profile(), big_speedup_p(), btf_collect_datasec(), btf_init_postprocess(), build_type_inheritance_graph(), caller_growth_limits(), calls_builtin_apply_args_p(), can_early_inline_edge_p(), can_increase_alignment_p(), can_inline_edge_by_limits_p(), can_inline_edge_p(), can_remove_node_now_p_1(), can_replace_by_local_alias(), can_replace_by_local_alias_in_vtable(), can_strub_internally_p(), can_strub_p(), cgraph_edge::cannot_lead_to_return_p(), cdtor_p(), cgraph_externally_visible_p(), cgraph_node_cannot_be_local_p_1(), cgraph_update_edges_for_call_stmt_node(), symbol_table::change_decl_assembler_name(), check_argument_count(), check_callers(), ipa_icf::clear_decl_rtl(), clone_inlined_nodes(), clone_of_p(), comdat_can_be_unshared_p_1(), ipa_icf::sem_function::compare_polymorphic_p(), ipa_icf::sem_item::compare_referenced_symbol_properties(), symbol_table::compile(), compute_bb_predicates(), compute_fn_summary(), compute_max_insns(), compute_strub_mode(), copy_function_or_variable(), copy_visibility_from(), coverage_compute_profile_id(), cgraph_node::create(), varpool_node::create_alias(), cgraph_node::create_clone(), create_dispatcher_calls(), symbol_table::create_edge(), create_emultls_var(), create_specialized_node(), create_target_clone(), create_variable_info_for(), cgraph_node::create_version_clone_with_body(), cgraph_node::create_virtual_clone(), cgraph_node::create_wrapper(), ctor_for_folding(), determine_versionability(), devirt_variable_node_removal_hook(), devirtualization_time_bonus(), dissolve_same_comdat_group_list(), distinctify_node_type(), do_assemble_alias(), do_estimate_edge_time(), do_estimate_growth_1(), do_per_function(), do_per_function_toporder(), drop_profile(), ipa_icf::sem_item::dump(), dump_callgraph_transformation(), dump_inline_stats(), funct_state_summary_t::duplicate(), duplicate_thunk_for_node(), early_inline_small_functions(), early_inliner(), edge_badness(), asmname_hasher::equal(), ipa_icf::sem_variable::equals(), estimate_edge_devirt_benefit(), ipa_call_context::estimate_size_and_time(), estimated_stack_frame_size(), execute_all_ipa_transforms(), execute_split_functions(), expand_all_functions(), expand_simd_clones(), expand_target_clones(), expand_thunk(), varpool_node::finalize_decl(), find_decl(), cgraph_node::find_replacement(), symbol_table::first_static_initializer(), fixup_call_stmt_edges(), fixup_same_cpp_alias_visibility(), flatten_function(), flatten_remove_node_hook(), fre_will_run_p(), function_and_variable_visibility(), function_called_by_processed_nodes_p(), generate_summary(), get_alias_target_tree(), get_alignment_1(), get_constraint_for_ssa_var(), varpool_node::get_create(), cgraph_node::get_create(), cgraph_node::get_fun(), get_max_overall_size(), get_read_write_all_from_node(), get_section_name(), get_strub_mode(), cgraph_node::get_untransformed_body(), gimplify_all_functions(), good_cloning_opportunity_p(), handle_missing_profiles(), omp_declare_variant_hasher::hash(), omp_declare_variant_alt_hasher::hash(), asmname_hasher::hash(), ipa_icf::sem_item::hash_referenced_symbol_properties(), hint_time_bonus(), ignore_edge_for_nothrow(), ignore_edge_for_pure_const(), ignore_edge_p(), incorporate_penalties(), increase_alignment_1(), ipa_icf::sem_function::init(), ipa_icf::sem_variable::init(), init_node_map(), inline_account_function_p(), inline_always_inline_functions(), inline_analyze_function(), inline_call(), inline_insns_auto(), inline_insns_single(), inline_small_functions(), inline_transform(), input_cgraph_1(), input_edge(), input_node(), input_overwrite_node(), input_varpool_node(), funct_state_summary_t::insert(), modref_summaries::insert(), modref_summaries_lto::insert(), symbol_table::insert_to_assembler_name_hash(), ipa_analyze_controlled_uses(), ipa_analyze_node(), ipa_cdtor_merge(), ipa_comdats(), ipa_compute_jump_functions_for_edge(), ipa_devirt(), ipa_dump_fn_summary(), ipa_fn_summary_generate(), ipa_get_callee_param_type(), ipa_get_indirect_edge_target_1(), ipa_initialize_node_params(), ipa_inline(), ipa_lower_emutls(), ipa_make_function_const(), ipa_make_function_pure(), ipa_merge_modref_summary_after_inlining(), ipa_merge_profiles(), ipa_populate_param_decls(), ipa_profile(), ipa_profile_generate_summary(), ipa_propagate_frequency(), ipa_pta_execute(), ipa_read_edge_info(), ipa_reference_get_read_global(), ipa_reference_get_written_global(), ipa_return_value_range(), ipa_simd_modify_function_body(), ipa_sra_summarize_function(), ipa_tm_create_version(), ipa_tm_create_version_alias(), ipa_tm_diagnose_tm_safe(), ipa_tm_execute(), ipa_tm_mayenterirr_function(), ipa_tm_note_irrevocable(), ipa_tm_scan_calls_clone(), ipa_tm_scan_irr_function(), ipa_tm_transform_calls_redirect(), ipa_tm_transform_clone(), ipa_tm_transform_transaction(), ipa_write_summaries(), ipcp_cloning_candidate_p(), ipcp_propagate_stage(), ipcp_store_vr_results(), ipcp_transform_function(), ipcp_update_vr(), ipcp_verify_propagated_values(), is_improper(), likely_target_p(), localize_node(), lower_emutls_function_body(), lto_free_function_in_decl_state_for_node(), lto_output_node(), lto_output_varpool_node(), lto_prepare_function_for_streaming(), lto_read_body_or_constructor(), cgraph_edge::make_direct(), make_item_for_dump_symtab_node(), cgraph_node::make_local(), cgraph_edge::make_speculative(), mark_functions_to_output(), master_clone_with_noninline_clones_p(), cgraph_node::materialize_clone(), cgraph_edge::maybe_hot_p(), maybe_record_nested_function(), ipa_icf::sem_function::merge(), ipa_icf::sem_variable::merge(), merge_aggregate_lattices(), ipa_param_adjustments::modify_call(), new_emutls_decl(), non_local_p(), noninterposable_alias(), noninterposable_alias(), nonzero_address(), num_calls(), offline_size(), ok_for_auto_simd_clone(), omp_declare_variant_remove_hook(), omp_discover_declare_target_tgt_fn_r(), omp_discover_declare_target_var_r(), omp_discover_implicit_declare_target(), omp_lto_input_declare_variant_alt(), omp_lto_output_declare_variant_alt(), optimize_weakref(), output_constructor(), output_function(), output_to_lto_symbol_table_p(), symbol_table::output_variables(), symbol_table::output_weakrefs(), ipa_icf::sem_function::parse(), ipa_icf::sem_variable::parse(), perform_estimation_of_a_value(), possible_inline_candidate_p(), possible_polymorphic_call_target_p(), cgraph_edge::possibly_call_in_translation_unit_p(), process_function_and_variable_attributes(), symbol_table::process_new_functions(), process_references(), process_symver_attribute(), produce_symtab(), produce_symtab_extension(), propagate(), propagate_aggs_across_jump_function(), propagate_constants_across_call(), propagate_constants_topo(), value_topo_info< valtype >::propagate_effects(), propagate_malloc(), propagate_nothrow(), propagate_pure_const(), propagate_vals_across_arith_jfunc(), pure_const_generate_summary(), pure_const_read_summary(), read_ipa_call_summary(), read_thunk_profile(), read_write_all_from_decl(), record_cdtor_fn(), record_eh_tables(), record_reference(), recursive_inlining(), cgraph_edge::recursive_p(), ipa_icf::redirect_all_callers(), cgraph_edge::redirect_call_stmt_to_callee(), redirect_to_specific_clone(), redirect_to_unreachable(), refered_from_nonlocal_fn(), refered_from_nonlocal_var(), referenced_from_vtable_p(), cgraph_node::remove(), symbol_table::remove_unreachable_nodes(), symbol_table::remove_unreferenced_decls(), report_inline_failed_reason(), cgraph_node::rtl_info(), save_inline_function_body(), ipa_icf::sem_item::sem_item(), semantically_equivalent_p(), ipa_icf::set_addressable(), ipa_icf::set_alias_uids(), cgraph_edge::set_call_stmt(), set_const_flag_1(), set_malloc_flag_1(), set_new_clone_decl_and_node_flags(), set_noreturn_flag_1(), set_nothrow_flag_1(), set_pure_flag_1(), set_strub_mode(), set_strub_mode_to(), simd_clone_adjust(), simd_clone_adjust_argument_types(), simd_clone_adjust_return_type(), simd_clone_clauses_extract(), simd_clone_compute_base_data_type(), simd_clone_create(), simd_clone_init_simd_arrays(), simd_clone_mangle(), speculation_useful_p(), split_function(), strub_always_inline_p(), strub_callable_builtin_p(), strub_from_body_p(), ipa_icf::symbol_compare_collection::symbol_compare_collection(), tree_profiling(), try_make_edge_direct_virtual_call(), unlikely_executed_stmt_p(), symbol_table::unlink_from_assembler_name_hash(), update_call_expr(), update_indirect_edges_after_inlining(), update_type_inheritance_graph(), update_visibility_by_resolution_info(), update_vtable_references(), varpool_removal_hook(), verify_base(), cgraph_edge::verify_corresponds_to_fndecl(), cgraph_node::verify_node(), verify_node_partition(), verify_strub(), verify_symtab_nodes(), vrp_will_run_p(), walk_polymorphic_call_targets(), want_early_inline_function_p(), want_inline_small_function_p(), worse_state(), and wrapper_heuristics_may_apply().

◆ definition

unsigned symtab_node::definition

Referenced by cgraph_node::add_new_function(), varpool_node::all_refs_explicit_p(), cgraph_node::analyze(), analyze_functions(), varpool_node::assemble_decl(), binds_to_current_def_p(), can_inline_edge_p(), can_replace_by_local_alias(), cgraph_externally_visible_p(), symbol_table::change_decl_assembler_name(), clone_inlined_nodes(), ipa_icf::sem_function::compare_polymorphic_p(), compute_ltrans_boundary(), copy_bb(), cgraph_node::create_clone(), create_dispatcher_calls(), cgraph_node::create_thunk(), cgraph_node::create_version_clone(), cgraph_node::create_wrapper(), devirtualization_time_bonus(), dump_base(), enqueue_references(), estimate_edge_devirt_benefit(), estimate_num_insns(), expand_simd_clones(), expand_target_clones(), varpool_node::externally_visible_p(), varpool_node::finalize_decl(), cgraph_node::finalize_function(), symbol_table::first_defined_symbol(), function_and_variable_visibility(), varpool_node::get_availability(), get_partitioning_class(), handle_alias_pairs(), cgraph_node::has_gimple_body_p(), initialize_inline_failed(), inline_always_inline_functions(), input_overwrite_node(), input_varpool_node(), ipa_compute_jump_functions_for_bb(), ipa_dump_fn_summary(), ipa_inline(), ipa_lower_emutls(), ipa_merge_profiles(), ipa_print_node_params(), ipa_profile_write_summary(), ipa_prop_read_section(), ipa_single_use(), ipa_target_clone(), ipa_write_summaries(), ipcp_propagate_stage(), lto_output_node(), lto_output_varpool_node(), mark_decl_referenced(), needed_p(), non_local_p(), nonzero_address(), ok_for_auto_simd_clone(), optimize_weakref(), output_to_lto_symbol_table_p(), symbol_table::output_variables(), possible_polymorphic_call_target_p(), prevailing_p(), process_function_and_variable_attributes(), process_references(), process_symver_attribute(), propagate_constants_across_call(), propagate_malloc(), pure_const_write_summary(), reachable_from_other_partition_p(), ipa_icf::sem_item_optimizer::read_section(), real_symbol_p(), reference_to_unused(), symbol_table::remove_unreachable_nodes(), reset(), resolve_alias(), simd_clone_adjust_argument_types(), simd_clone_create(), update_type_inheritance_graph(), vect_recog_pow_pattern(), verify_base(), cgraph_node::verify_node(), walk_polymorphic_call_targets(), wrapup_global_declaration_2(), and write_node_summary_p().

◆ externally_visible

◆ force_output

◆ forced_by_abi

◆ ifunc_resolver

◆ implicit_section

◆ in_init_priority_hash

unsigned symtab_node::in_init_priority_hash

◆ in_other_partition

◆ lto_file_data

◆ need_lto_streaming

◆ next

◆ next_sharing_asm_name

◆ no_reorder

◆ offloadable

◆ order

◆ previous

symtab_node* symtab_node::previous

◆ previous_sharing_asm_name

◆ ref_list

◆ refuse_visibility_changes

unsigned symtab_node::refuse_visibility_changes

◆ resolution

◆ same_comdat_group

◆ semantic_interposition

◆ symver

◆ transparent_alias

◆ type

◆ unique_name

◆ used_from_other_partition

◆ weakref

◆ writeonly

unsigned symtab_node::writeonly

◆ x_comdat_group

tree symtab_node::x_comdat_group

◆ x_section

section_hash_entry* symtab_node::x_section

The documentation for this struct was generated from the following files: