GCC Middle and Back End API Reference
varpool_node Class Reference

#include <cgraph.h>

Inheritance diagram for varpool_node:
Collaboration diagram for varpool_node:

Data Fields

unsigned output: 1
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_datalto_file_data
PTR aux

Detailed Description

   The varpool data structure.
   Each static variable decl has assigned varpool_node.  

Field Documentation

unsigned symtab_node_base::address_taken
     other flags.  
     Set when symbol has address taken. 

Referenced by cgraph_set_nothrow_flag_1().

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
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.  
ENUM_BITFIELD (symtab_type) type ENUM_BITFIELD (ld_plugin_symbol_resolution) resolution unsigned symtab_node_base::definition
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().

unsigned varpool_node::output
     Set when variable is scheduled to be assembled.  

Referenced by varpool_remove_initializer().

symtab_node symtab_node_base::previous
symtab_node symtab_node_base::previous_sharing_asm_name

Referenced by eq_assembler_name().

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
     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().

The documentation for this class was generated from the following file: