GCC Middle and Back End API Reference
|
Variables | |
const char *const | ld_plugin_symbol_resolution_names [] |
static htab_t | symtab_hash |
static htab_t | assembler_name_hash |
symtab_node | symtab_nodes |
int | symtab_order |
static const char *const | symtab_type_names [] = {"symbol", "function", "variable"} |
void change_decl_assembler_name | ( | ) |
Set the DECL_ASSEMBLER_NAME and update symtab hashtables.
References insert_to_assembler_name_hash(), symtab_get_node(), unlink_from_assembler_name_hash(), and warning().
Referenced by set_user_assembler_name().
DEBUG_FUNCTION void debug_symtab | ( | void | ) |
Dump symbol table to stderr.
References dump_symtab().
DEBUG_FUNCTION void debug_symtab_node | ( | ) |
Dump symtab node NODE to stderr.
References dump_symtab_node().
void dump_symtab | ( | ) |
Dump symbol table.
References dump_symtab_node().
void dump_symtab_base | ( | ) |
Dump base fields of symtab nodes. Not to be used directly.
References dump_addr(), ipa_dump_references(), ipa_dump_referring(), ld_plugin_symbol_resolution_names, symtab_node_asm_name(), and symtab_node_name().
void dump_symtab_node | ( | ) |
Dump symtab node.
References dump_cgraph_node(), and dump_varpool_node().
|
static |
Returns nonzero if P1 and P2 are equal.
References decl_assembler_name_equal().
Referenced by symtab_initialize_asm_name_hash().
|
static |
Returns nonzero if P1 and P2 are equal.
Referenced by symtab_insert_node_to_hashtable(), and symtab_register_node().
void fixup_same_cpp_alias_visibility | ( | ) |
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 symtab_add_to_same_comdat_group().
|
static |
Returns a hash code for P.
Referenced by symtab_insert_node_to_hashtable(), and symtab_register_node().
|
static |
Returns a hash code for P.
References decl_assembler_name_hash().
Referenced by symtab_initialize_asm_name_hash().
|
static |
Insert NODE to assembler name hash.
References assembler_name_hash, cgraph_node::clones, symtab_node_base::decl, decl::decl, decl_assembler_name_hash(), dyn_cast(), cgraph_node::next_sibling_clone, and cgraph_node::symbol.
Referenced by change_decl_assembler_name(), symtab_initialize_asm_name_hash(), symtab_prevail_in_asm_name_hash(), and symtab_register_node().
bool resolution_used_from_other_file_p | ( | ) |
Return true when RESOLUTION indicate that linker will use the symbol from non-LTO object files.
void symtab_add_to_same_comdat_group | ( | symtab_node | new_node, |
symtab_node | old_node | ||
) |
Add NEW_ to the same comdat group that OLD is in.
Referenced by fixup_same_cpp_alias_visibility().
symtab_node symtab_alias_ultimate_target | ( | ) |
Given NODE, walk the alias chain to return the symbol NODE is alias of. If NODE is not an alias, return NODE. When AVAILABILITY is non-NULL, get minimal availability in the chain.
References AVAIL_LOCAL, AVAIL_NOT_AVAILABLE, symtab_alias_target(), and symtab_node_availability().
void symtab_dissolve_same_comdat_group_list | ( | ) |
Dissolve the same_comdat_group list in which NODE resides.
References symtab_node_base::next.
bool symtab_for_node_and_aliases | ( | symtab_node | node, |
bool(*)(symtab_node, void *) | callback, | ||
void * | data, | ||
bool | include_overwritable | ||
) |
Call calback on NODE and aliases associated to NODE. When INCLUDE_OVERWRITABLE is false, overwritable aliases and thunks are skipped.
References AVAIL_OVERWRITABLE, IPA_REF_ALIAS, ipa_ref::referring, symtab_for_node_and_aliases(), and symtab_node_availability().
Referenced by symtab_for_node_and_aliases(), and symtab_nonoverwritable_alias().
symtab_node symtab_get_node | ( | ) |
Return symbol table node associated with DECL, if any, and NULL otherwise.
References symtab_node_base::decl, and symtab_hash.
void symtab_initialize_asm_name_hash | ( | void | ) |
Initalize asm name hash unless.
References assembler_name_hash, eq_assembler_name(), hash_node_by_assembler_name(), and insert_to_assembler_name_hash().
Referenced by lto_symtab_merge_decls(), lto_symtab_merge_symbols(), and symtab_node_for_asm().
void symtab_insert_node_to_hashtable | ( | ) |
Make NODE to be the one symtab hash is pointing to. Used when reshaping tree of inline clones.
References symtab_node_base::decl, eq_node(), hash_node(), and symtab_hash.
void symtab_make_decl_local | ( | ) |
Make DECL local. FIXME: We shouldn't need to mess with rtl this early, but other code such as notice_global_symbol generates rtl.
References make_decl_rtl(), and VISIBILITY_DEFAULT.
const char* symtab_node_asm_name | ( | ) |
Return printable assembler name of NODE. This function is used only for debugging. When assembler name is unknown go with identifier name.
References lang_hooks::decl_printable_name.
enum availability symtab_node_availability | ( | ) |
Return availability of NODE.
References cgraph(), cgraph_function_body_availability(), cgraph_variable_initializer_availability(), and varpool().
symtab_node symtab_node_for_asm | ( | ) |
Return the cgraph node that has ASMNAME for its DECL_ASSEMBLER_NAME. Return NULL if there's no such node.
References assembler_name_hash, decl_assembler_name_hash(), and symtab_initialize_asm_name_hash().
const char* symtab_node_name | ( | ) |
Return printable identifier name.
References lang_hooks::decl_printable_name.
symtab_node symtab_nonoverwritable_alias | ( | ) |
If NODE can not be overwriten by static or dynamic linker to point to different definition, return NODE. Otherwise look for alias with such property and if none exists, introduce new one.
References cgraph_create_function_alias(), clone_function_name(), copy_node(), symtab_for_node_and_aliases(), symtab_nonoverwritable_alias_1(), symtab_resolve_alias(), and varpool_create_variable_alias().
|
static |
Worker searching nonoverwritable alias.
References decl_binds_to_current_def_p().
Referenced by symtab_nonoverwritable_alias().
void symtab_prevail_in_asm_name_hash | ( | ) |
Arrange node to be first in its entry of assembler_name_hash.
References insert_to_assembler_name_hash(), and unlink_from_assembler_name_hash().
void symtab_register_node | ( | ) |
Add node into symbol table. This function is not used directly, but via cgraph/varpool node creation routines.
References symtab_node_base::decl, eq_node(), hash_node(), insert_to_assembler_name_hash(), ipa_empty_ref_list(), symtab_hash, symtab_nodes, and symtab_order.
void symtab_remove_node | ( | ) |
Remove symtab NODE from the symbol table.
References cgraph_remove_node(), and varpool_remove_node().
bool symtab_resolve_alias | ( | ) |
Add reference recording that NODE is alias of TARGET. The function can fail in the case of aliasing cycles; in this case it returns false.
References CGRAPH_STATE_CONSTRUCTION, error(), fixup_same_cpp_alias_visibility(), ipa_record_reference(), IPA_REF_ALIAS, symtab_alias_target(), symtab_alias_ultimate_target(), and vec_safe_length().
void symtab_unregister_node | ( | ) |
Remove node from symbol table. This function is not used directly, but via cgraph/varpool node removal routines.
References cgraph_find_replacement_node(), ipa_remove_all_references(), ipa_remove_all_referring(), symtab_hash, symtab_nodes, and unlink_from_assembler_name_hash().
bool symtab_used_from_object_file_p | ( | ) |
Return true when NODE is known to be used from other (non-LTO) object file. Known only when doing LTO via linker plugin.
References resolution_used_from_other_file_p().
|
static |
Remove NODE from assembler name hash.
References assembler_name_hash, cgraph_node::clones, symtab_node_base::decl, decl::decl, decl_assembler_name_hash(), dyn_cast(), cgraph_node::next_sibling_clone, and cgraph_node::symbol.
Referenced by change_decl_assembler_name(), symtab_prevail_in_asm_name_hash(), and symtab_unregister_node().
DEBUG_FUNCTION void verify_symtab | ( | void | ) |
Verify symbol table for internal consistency.
References verify_symtab_node().
Referenced by compile(), and symtab_remove_unreachable_nodes().
DEBUG_FUNCTION bool verify_symtab_base | ( | ) |
Verify common part of symtab nodes.
References assembler_name_hash, CGRAPH_LTO_STREAMING, error(), error_found, symtab_get_node(), and symtab_node_for_asm().
DEBUG_FUNCTION void verify_symtab_node | ( | ) |
Verify consistency of NODE.
References dump_symtab_node(), internal_error(), seen_error(), timevar_pop(), timevar_push(), verify_cgraph_node(), and verify_symtab_base().
|
static |
Hash table used to convert assembler names into nodes.
Referenced by insert_to_assembler_name_hash(), symtab_initialize_asm_name_hash(), symtab_node_for_asm(), unlink_from_assembler_name_hash(), and verify_symtab_base().
const char* const ld_plugin_symbol_resolution_names[] |
@verbatim Symbol table.
Copyright (C) 2012-2013 Free Software Foundation, Inc. Contributed by Jan Hubicka
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GCC; see the file COPYING3. If not see http://www.gnu.org/licenses/.
Referenced by dump_symtab_base().
|
static |
Hash table used to convert declarations into nodes.
Referenced by symtab_get_node(), symtab_insert_node_to_hashtable(), symtab_register_node(), and symtab_unregister_node().
symtab_node symtab_nodes |
Linked list of symbol table nodes.
Referenced by analyze_functions(), symtab_register_node(), and symtab_unregister_node().
int symtab_order |
The order index of the next symtab node to be created. This is used so that we can sort the cgraph nodes in order by when we saw them, to support -fno-toplevel-reorder.
Referenced by add_asm_node(), input_cgraph_1(), input_node(), input_varpool_node(), lto_input_toplevel_asms(), output_in_order(), and symtab_register_node().