GCC Middle and Back End API Reference
cgraph_node Struct Reference

#include <cgraph.h>

Inheritance diagram for cgraph_node:
Collaboration diagram for cgraph_node:

Data Fields

struct cgraph_edgecallees
struct cgraph_edgecallers
struct cgraph_edgeindirect_calls
struct cgraph_nodeorigin
struct cgraph_nodenested
struct cgraph_nodenext_nested
struct cgraph_nodenext_sibling_clone
struct cgraph_nodeprev_sibling_clone
struct cgraph_nodeclones
struct cgraph_nodeclone_of
htab_t call_site_hash
tree former_clone_of
vec< ipa_opt_passipa_transforms_to_apply
struct cgraph_local_info local
struct cgraph_global_info global
struct cgraph_rtl_info rtl
struct cgraph_clone_info clone
struct cgraph_thunk_info thunk
gcov_type count
int count_materialization_scale
int uid
unsigned int profile_id
unsigned used_as_abstract_origin: 1
unsigned lowered: 1
unsigned process: 1
ENUM_BITFIELD(node_frequency)
frequency unsigned 
only_called_at_startup: 1
unsigned only_called_at_exit: 1
unsigned tm_clone: 1
unsigned dispatcher_function: 1
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_datalto_file_data
PTR aux

Detailed Description

   The cgraph data structure.
   Each function decl has assigned cgraph_node listing callees and callers.  

Field Documentation

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

Referenced by cgraph_set_nothrow_flag_1().

tree symtab_node_base::alias_target
inherited
     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
inherited
     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
inherited
htab_t cgraph_node::call_site_hash
     For functions with many calls sites it holds map from call expression
     to the edge to speed up cgraph_edge function.  
gcov_type cgraph_node::count
int cgraph_node::count_materialization_scale
     How to scale counts at materialization time; used to merge
     LTO units with different number of profile runs.  

Referenced by cgraph_remove_node_duplication_hook(), and input_overwrite_node().

unsigned symtab_node_base::cpp_implicit_alias
inherited
     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
inherited
unsigned cgraph_node::dispatcher_function
     True if this decl is a dispatcher for function versions.  
unsigned symtab_node_base::externally_visible
inherited
     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
inherited
     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
inherited
     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().

tree cgraph_node::former_clone_of
     Declaration node used to be clone of. 
unsigned symtab_node_base::in_other_partition
inherited
     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 cgraph_edge* cgraph_node::indirect_calls
     List of edges representing indirect calls with a yet undetermined
     callee.  

Referenced by cgraph_allocate_init_indirect_info(), copy_static_chain(), possible_polymorphic_call_target_p(), remap_predicate(), try_decrement_rdesc_refcount(), and update_call_expr().

vec<ipa_opt_pass> cgraph_node::ipa_transforms_to_apply
     Interprocedural passes scheduled to have their transform functions
     applied next time we execute local pass on them.  We maintain it
     per-function in order to allow IPA passes to introduce new functions.  

Referenced by cgraph_node_remove_callees(), and input_overwrite_node().

unsigned cgraph_node::lowered
     Set once the function is lowered (i.e. its CFG is built).  
struct lto_file_decl_data* symtab_node_base::lto_file_data
inherited
     File stream where this node is being written to.  

Referenced by debug_varpool_node_set(), and remap_hint_predicate().

struct cgraph_node* cgraph_node::nested
     Points to first nested function, if any.  

Referenced by cgraph_call_node_duplication_hooks(), cgraph_node_remove_callees(), and walk_all_functions().

symtab_node symtab_node_base::next
inherited
     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().

struct cgraph_node* cgraph_node::next_nested
     Pointer to the next function with same origin, if any.  

Referenced by cgraph_call_node_duplication_hooks(), cgraph_node_remove_callees(), and walk_all_functions().

symtab_node symtab_node_base::next_sharing_asm_name
inherited
     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 cgraph_node::only_called_at_exit
     True when function can only be called at startup (from static dtor).  

Referenced by default_function_section().

ENUM_BITFIELD (node_frequency) frequency unsigned cgraph_node::only_called_at_startup
     How commonly executed the node is.  Initialized during branch
     probabilities pass.  
     True when function can only be called at startup (from static ctor).  

Referenced by default_function_section(), and ipa_propagate_frequency().

struct cgraph_node* cgraph_node::origin
     For nested functions points to function the node is nested in.  

Referenced by cgraph_call_node_duplication_hooks(), and cgraph_node_remove_callees().

struct cgraph_node* cgraph_node::prev_sibling_clone
symtab_node symtab_node_base::previous
inherited
symtab_node symtab_node_base::previous_sharing_asm_name
inherited

Referenced by eq_assembler_name().

unsigned cgraph_node::process
     Set once the function has been instantiated and its callee
     lists created.  

Referenced by cgraph_process_new_functions(), and expand_all_functions().

unsigned int cgraph_node::profile_id
     ID assigned by the profiling.  
struct cgraph_rtl_info cgraph_node::rtl

Referenced by update_call_expr().

symtab_node symtab_node_base::same_comdat_group
inherited
     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 cgraph_node::tm_clone
     True when function is the transactional clone of a function which
     is called only from inside transactions.  
     ?? We should be able to remove this.  We have enough bits in
     cgraph to calculate it.  
int cgraph_node::uid
     Unique id of the node.  

Referenced by cgraph_node_remove_callees(), and ipa_get_cs_argument_count().

unsigned symtab_node_base::unique_name
inherited
     True when the name is known to be unique and thus it does not need mangling.  

Referenced by cgraph_unnest_node().

unsigned cgraph_node::used_as_abstract_origin
     Set when decl is an abstract function pointed to by the
     ABSTRACT_DECL_ORIGIN of a reachable function.  

Referenced by symtab_remove_unreachable_nodes().

unsigned symtab_node_base::used_from_other_partition
inherited
     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
inherited
     True when alias is a weakref.  

Referenced by cgraph_create_empty_node(), and varpool_output_variables().


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