GCC Middle and Back End API Reference
|
Functions | |
struct varpool_node * | varpool_create_empty_node () |
struct varpool_node * | varpool_node_for_decl () |
void | varpool_remove_node () |
void | varpool_remove_initializer () |
void | dump_varpool_node () |
void | dump_varpool () |
DEBUG_FUNCTION void | debug_varpool () |
struct varpool_node * | varpool_node_for_asm () |
tree | ctor_for_folding () |
void | varpool_add_new_variable () |
enum availability | cgraph_variable_initializer_availability () |
void | varpool_analyze_node () |
static void | assemble_aliases () |
bool | varpool_assemble_decl () |
static void | enqueue_node () |
static void | varpool_remove_unreferenced_decls () |
void | varpool_finalize_named_section_flags () |
bool | varpool_output_variables () |
tree | add_new_static_var () |
struct varpool_node * | varpool_create_variable_alias () |
struct varpool_node * | varpool_extra_name_alias () |
bool | varpool_for_node_and_aliases (struct varpool_node *node, bool(*callback)(struct varpool_node *, void *), void *data, bool include_overwritable) |
tree add_new_static_var | ( | ) |
Create a new global variable of type TYPE.
References create_tmp_var_name(), create_tmp_var_raw(), symtab_node_base::decl, lang_hooks::dup_lang_specific_decl, varpool_node::symbol, varpool_finalize_decl(), and varpool_node_for_decl().
|
static |
Assemble thunks and aliases associated to NODE.
References symtab_node_base::decl, do_assemble_alias(), IPA_REF_ALIAS, ipa_ref_referring_varpool_node(), symtab_node_base::ref_list, and varpool_node::symbol.
Referenced by varpool_assemble_decl().
enum availability cgraph_variable_initializer_availability | ( | ) |
Return variable availability. See cgraph.h for description of individual return values.
References AVAIL_AVAILABLE, AVAIL_NOT_AVAILABLE, AVAIL_OVERWRITABLE, cgraph_function_flags_ready, symtab_node_base::decl, decl_replaceable_p(), symtab_node_base::definition, and varpool_node::symbol.
tree ctor_for_folding | ( | ) |
Return if DECL is constant and its initial value is known (so we can do constant folding using DECL_INITIAL (decl)). Return ERROR_MARK_NODE when value is unknown.
References symtab_node_base::decl, decl_replaceable_p(), lookup_attribute(), varpool_node::symbol, varpool_alias_target(), varpool_get_node(), and varpool_variable_node().
DEBUG_FUNCTION void debug_varpool | ( | void | ) |
Dump the variable pool to stderr.
References dump_varpool().
void dump_varpool | ( | ) |
Dump the variable pool.
References dump_varpool_node().
void dump_varpool_node | ( | ) |
Dump given cgraph node.
References cgraph_availability_names, cgraph_function_flags_ready, cgraph_variable_initializer_availability(), ctor_for_folding(), and dump_symtab_base().
|
static |
Add NODE to queue starting at FIRST. The queue is linked via AUX pointers and terminated by pointer to 1.
References symtab_node_base::aux, first, and varpool_node::symbol.
Referenced by varpool_remove_unreferenced_decls().
void varpool_add_new_variable | ( | ) |
Add the variable DECL to the varpool. Unlike varpool_finalize_decl function is intended to be used by middle end and allows insertion of new variable at arbitrary point of compilation.
References symtab_node_base::externally_visible, varpool_node::symbol, varpool_externally_visible_p(), varpool_finalize_decl(), and varpool_node_for_decl().
void varpool_analyze_node | ( | ) |
bool varpool_assemble_decl | ( | ) |
Output one variable, if necessary. Return whether we output it.
References symtab_node_base::alias, assemble_aliases(), assemble_variable(), symtab_node_base::decl, symtab_node_base::definition, symtab_node_base::in_other_partition, varpool_node::symbol, and targetm.
|
read |
@verbatim Callgraph handling code.
Copyright (C) 2003-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/.
Allocate new callgraph node and insert it into basic data structures.
References varpool_node::symbol, and SYMTAB_VARIABLE.
Referenced by input_varpool_node(), and varpool_node_for_decl().
|
read |
Attempt to mark ALIAS as an alias to DECL. Return TRUE if successful. Extra name aliases are output whenever DECL is output.
References symtab_node_base::alias, symtab_node_base::alias_target, symtab_node_base::definition, lookup_attribute(), varpool_node::symbol, varpool_node_for_decl(), and symtab_node_base::weakref.
|
read |
Attempt to mark ALIAS as an alias to DECL. Return TRUE if successful. Extra name aliases are output whenever DECL is output.
References symtab_node_base::cpp_implicit_alias, cpp_implicit_aliases_done, varpool_node::symbol, symtab_resolve_alias(), varpool_create_variable_alias(), and varpool_node_for_decl().
void varpool_finalize_named_section_flags | ( | ) |
For variables in named sections make sure get_variable_section is called before we switch to those sections. Then section conflicts between read-only and read-only requiring relocations sections can be resolved.
References symtab_node_base::alias, symtab_node_base::decl, get_variable_section(), symtab_node_base::in_other_partition, and varpool_node::symbol.
bool varpool_for_node_and_aliases | ( | struct varpool_node * | node, |
bool(*)(struct varpool_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, cgraph_variable_initializer_availability(), IPA_REF_ALIAS, ipa_ref_referring_varpool_node(), symtab_node_base::ref_list, varpool_node::symbol, and varpool_for_node_and_aliases().
Referenced by ipa_lower_emutls(), and varpool_for_node_and_aliases().
|
read |
Given an assembler name, lookup node.
References dyn_cast(), and symtab_node_for_asm().
|
read |
Return varpool node assigned to DECL. Create new one when needed.
References symtab_node_base::decl, varpool_node::symbol, symtab_register_node(), varpool_create_empty_node(), and varpool_get_node().
bool varpool_output_variables | ( | void | ) |
Output all variables enqueued to be assembled.
References changed, seen_error(), timevar_pop(), timevar_push(), varpool_assemble_decl(), varpool_finalize_named_section_flags(), and varpool_remove_unreferenced_decls().
Referenced by compile().
void varpool_remove_initializer | ( | ) |
Renove node initializer when it is no longer needed.
References CGRAPH_LTO_STREAMING, symtab_node_base::decl, DINFO_LEVEL_NONE, and varpool_node::symbol.
void varpool_remove_node | ( | ) |
Remove node from the varpool.
References ctor_for_folding(), ggc_free(), symtab_unregister_node(), and varpool_remove_initializer().
|
static |
Optimization of function bodies might've rendered some variables as unnecessary so we want to avoid these from being compiled. Re-do reachability starting from variables that are either externally visible or was referred from the asm output routines.
References symtab_node_base::alias, symtab_node_base::analyzed, symtab_node_base::aux, cgraph_dump_file, symtab_node_base::decl, dyn_cast(), enqueue_node(), first, symtab_node_base::ref_list, ipa_ref::referred, symtab_node_base::same_comdat_group, seen_error(), varpool_node::symbol, varpool_can_remove_if_no_refs(), varpool_first_defined_variable(), varpool_next_defined_variable(), varpool_node_asm_name(), and varpool_remove_node().
Referenced by varpool_output_variables().