GCC Middle and Back End API Reference
|
#include <cgraph.h>
The cgraph data structure. Each function decl has assigned cgraph_node listing callees and callers.
|
inherited |
|
inherited |
True when symbol is an alias. Set by assemble_alias.
Referenced by cgraph_create_empty_node(), cgraph_create_function_alias(), contains_hot_call_p(), fixup_same_cpp_alias_visibility(), print_all_lattices(), process_common_attributes(), propagate_aggs_accross_jump_function(), read_inline_edge_summary(), varpool_output_variables(), and varpool_remove_unreferenced_decls().
|
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().
|
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().
|
inherited |
Referenced by ipa_free_postorder_info(), ipa_reverse_postorder(), searchc(), and symtab_remove_unreachable_nodes().
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.
struct cgraph_edge* cgraph_node::callees |
struct cgraph_edge* cgraph_node::callers |
struct cgraph_clone_info cgraph_node::clone |
struct cgraph_node* cgraph_node::clone_of |
struct cgraph_node* cgraph_node::clones |
gcov_type cgraph_node::count |
Expected number of executions: calculated in profile.c.
Referenced by copy_static_chain(), dump_varpool_node_set(), get_next_cgraph_edge_clone(), input_overwrite_node(), update_call_expr(), and want_inline_self_recursive_call_p().
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().
|
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.
|
inherited |
Declaration representing the symbol.
Referenced by assemble_align(), cgraph_call_node_duplication_hooks(), cgraph_can_remove_if_no_direct_calls_and_refs_p(), cgraph_edge_cannot_lead_to_return(), cgraph_materialize_clone(), cgraph_node_cannot_be_local_p_1(), cgraph_set_const_flag_1(), cgraph_set_nothrow_flag_1(), cgraph_unnest_node(), clone_inlined_nodes(), contains_hot_call_p(), debug_symtab(), debug_varpool_node_set(), dump_symtab(), dump_varpool_node_set(), eq_assembler_name(), eq_node(), fixup_same_cpp_alias_visibility(), handle_alias_pairs(), hash_node(), hash_node_by_assembler_name(), init_alias_vars(), input_overwrite_node(), ipa_alloc_node_params(), ipa_analyze_call_uses(), ipa_discover_readonly_nonaddressable_vars(), ipa_reference_get_not_read_global(), ipa_reverse_postorder(), lower_emutls_phi_arg(), lto_out_decl_state_written_size(), lto_output_varpool_node(), output_weakrefs(), gcc::pass_manager::pass_manager(), predicate_for_phi_result(), process_common_attributes(), process_function_and_variable_attributes(), remove_preds_and_fake_succs(), report_inline_failed_reason(), save_debug_info_for_decl(), set_reference_optimization_summary(), spread_undeadness(), symtab_dissolve_same_comdat_group_list(), symtab_nonoverwritable_alias(), varpool_node_for_decl(), varpool_output_variables(), varpool_remove_initializer(), varpool_remove_unreferenced_decls(), walk_all_functions(), walk_polymorphic_call_targets(), and write_symbol().
|
inherited |
Type of the symbol.
The symbols resolution.
Flags representing the symbol type.
True when symbol corresponds to a definition in current unit. set via cgraph_finalize_function or varpool_finalize_decl
Referenced by cgraph_create_empty_node(), cgraph_create_function_alias(), clone_inlined_nodes(), comp_type_attributes(), declare_weak(), dump_varpool_node_set(), lto_output_varpool_node(), maybe_record_node(), process_common_attributes(), propagate_aggs_accross_jump_function(), read_inline_edge_summary(), symtab_remove_unreachable_nodes(), update_call_expr(), varpool_finalize_decl(), varpool_output_variables(), and walk_polymorphic_call_targets().
unsigned cgraph_node::dispatcher_function |
True if this decl is a dispatcher for function versions.
|
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().
|
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().
|
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.
struct cgraph_global_info cgraph_node::global |
Referenced by add_new_edges_to_heap(), can_refer_decl_in_current_unit_p(), cgraph_can_remove_if_no_direct_calls_p(), cgraph_edge_cannot_lead_to_return(), cgraph_set_const_flag_1(), clone_inlined_nodes(), do_estimate_edge_time(), flatten_function(), remap_hint_predicate(), symtab_remove_unreachable_nodes(), try_decrement_rdesc_refcount(), and update_call_expr().
|
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().
struct cgraph_local_info cgraph_node::local |
unsigned cgraph_node::lowered |
Set once the function is lowered (i.e. its CFG is built).
|
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().
|
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().
|
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().
struct cgraph_node* cgraph_node::next_sibling_clone |
Pointer to the next clone.
Referenced by cgraph_find_replacement_node(), cgraph_node_remove_callees(), cgraph_node_remove_callers(), copy_gimple_seq_and_replace_locals(), and replace_locals_op().
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().
|
inherited |
Ordering of all symtab entries.
Referenced by cgraph_edge_remove_caller(), free_varpool_node_set(), input_overwrite_node(), known_aggs_to_agg_replacement_list(), possible_polymorphic_call_target_p(), print_all_lattices(), remove_node_data(), and want_early_inline_function_p().
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 |
Referenced by cgraph_find_replacement_node(), cgraph_node_remove_callees(), and cgraph_node_remove_callers().
|
inherited |
|
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.
|
inherited |
Vectors of referring and referenced entities.
Referenced by dump_cgraph(), ipa_find_reference(), ipa_record_reference(), ipa_ref_has_aliases_p(), ipa_ref_referring_ref_list(), ipa_ref_referring_varpool_node(), ipa_remove_stmt_references(), lto_out_decl_state_written_size(), lto_output_varpool_node(), symtab_insert_node_to_hashtable(), symtab_resolve_alias(), and varpool_create_variable_alias().
struct cgraph_rtl_info cgraph_node::rtl |
Referenced by update_call_expr().
|
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().
struct cgraph_thunk_info cgraph_node::thunk |
Referenced by cgraph_create_function_alias(), print_all_lattices(), and propagate_aggs_accross_jump_function().
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().
|
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().
|
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().
|
inherited |
True when alias is a weakref.
Referenced by cgraph_create_empty_node(), and varpool_output_variables().