GCC Middle and Back End API Reference
|
Data Structures | |
struct | cgraph_edge_hook_list |
struct | cgraph_node_hook_list |
struct | cgraph_2edge_hook_list |
struct | cgraph_2node_hook_list |
struct | cgraph_propagate_frequency_data |
Variables | |
symtab_node | x_cgraph_nodes_queue |
int | cgraph_n_nodes |
int | cgraph_max_uid |
int | cgraph_edge_max_uid |
bool | cgraph_global_info_ready = false |
enum cgraph_state | cgraph_state = CGRAPH_STATE_PARSING |
bool | cgraph_function_flags_ready = false |
struct cgraph_edge_hook_list * | first_cgraph_edge_removal_hook |
struct cgraph_node_hook_list * | first_cgraph_node_removal_hook |
struct cgraph_2edge_hook_list * | first_cgraph_edge_duplicated_hook |
struct cgraph_2node_hook_list * | first_cgraph_node_duplicated_hook |
struct cgraph_node_hook_list * | first_cgraph_function_insertion_hook |
static struct cgraph_node * | free_nodes |
static struct cgraph_edge * | free_edges |
bool | cpp_implicit_aliases_done |
static htab_t | cgraph_fnver_htab = NULL |
static struct cgraph_function_version_info * | version_info_node = NULL |
const char *const | cgraph_availability_names [] |
|
read |
Register HOOK to be called with DATA on each duplicated edge.
References cgraph_2edge_hook_list::data, first_cgraph_edge_duplicated_hook, cgraph_2edge_hook_list::hook, and cgraph_2edge_hook_list::next.
Referenced by inline_summary_alloc(), ipa_register_cgraph_hooks(), and ipcp_driver().
|
read |
Register HOOK to be called with DATA on each removed edge.
References cgraph_edge_hook_list::data, first_cgraph_edge_removal_hook, cgraph_edge_hook_list::hook, and cgraph_edge_hook_list::next.
Referenced by inline_small_functions(), inline_summary_alloc(), and ipa_register_cgraph_hooks().
|
inlinestatic |
Add call graph edge E to call site hash of its caller.
References cgraph_node::call_site_hash, cgraph_edge::call_stmt, cgraph_edge::callee, cgraph_edge::caller, cgraph_edge::indirect_unknown_callee, and cgraph_edge::speculative.
Referenced by cgraph_create_edge_1(), cgraph_edge(), and cgraph_set_call_stmt().
|
read |
Register HOOK to be called with DATA on each inserted node.
References cgraph_node_hook_list::data, first_cgraph_function_insertion_hook, cgraph_node_hook_list::hook, and cgraph_node_hook_list::next.
Referenced by inline_generate_summary(), inline_read_summary(), ipa_register_cgraph_hooks(), and register_hooks().
|
read |
Register HOOK to be called with DATA on each duplicated node.
References cgraph_2node_hook_list::data, first_cgraph_node_duplicated_hook, cgraph_2node_hook_list::hook, and cgraph_2node_hook_list::next.
Referenced by inline_summary_alloc(), ipa_init(), ipa_reference_read_optimization_summary(), ipa_register_cgraph_hooks(), and register_hooks().
|
read |
Register HOOK to be called with DATA on each removed node.
References cgraph_node_hook_list::data, first_cgraph_node_removal_hook, cgraph_node_hook_list::hook, and cgraph_node_hook_list::next.
Referenced by inline_summary_alloc(), ipa_init(), ipa_reference_read_optimization_summary(), ipa_register_cgraph_hooks(), possible_polymorphic_call_targets(), and register_hooks().
|
read |
Add thunk alias into callgraph. The alias declaration is ALIAS and it aliases DECL with an adjustments made into the first parameter. See comments in thunk_adjust for detail on the parameters.
References symtab_node_base::alias, cgraph_thunk_info::alias, cgraph_create_node(), cgraph_get_node(), cgraph_remove_node(), symtab_node_base::definition, cgraph_thunk_info::fixed_offset, double_int::from_shwi(), cgraph_node::symbol, cgraph_thunk_info::this_adjusting, cgraph_node::thunk, cgraph_thunk_info::thunk_p, tree_to_double_int(), cgraph_thunk_info::virtual_offset_p, and cgraph_thunk_info::virtual_value.
|
read |
Allocate cgraph_indirect_call_info and set its fields to default values.
References cgraph_indirect_call_info::param_index.
Referenced by cgraph_create_indirect_edge().
|
staticread |
Allocate new callgraph node.
References cgraph_max_uid, free_nodes, and cgraph_node::uid.
Referenced by cgraph_create_empty_node().
void cgraph_call_edge_duplication_hooks | ( | struct cgraph_edge * | cs1, |
struct cgraph_edge * | cs2 | ||
) |
Call all edge duplication hooks.
References cgraph_2edge_hook_list::data, first_cgraph_edge_duplicated_hook, cgraph_2edge_hook_list::hook, and cgraph_2edge_hook_list::next.
Referenced by cgraph_clone_edge(), and cgraph_turn_edge_to_speculative().
|
static |
Call all edge removal hooks.
References cgraph_edge_hook_list::data, first_cgraph_edge_removal_hook, cgraph_edge_hook_list::hook, and cgraph_edge_hook_list::next.
Referenced by cgraph_node_remove_callees(), cgraph_node_remove_callers(), and cgraph_remove_edge().
void cgraph_call_function_insertion_hooks | ( | ) |
Call all node insertion hooks.
References cgraph_node_hook_list::data, first_cgraph_function_insertion_hook, cgraph_node_hook_list::hook, and cgraph_node_hook_list::next.
Referenced by cgraph_function_versioning(), cgraph_process_new_functions(), and ipa_tm_create_version().
void cgraph_call_node_duplication_hooks | ( | struct cgraph_node * | node1, |
struct cgraph_node * | node2 | ||
) |
Call all node duplication hooks.
References cgraph_2node_hook_list::data, first_cgraph_node_duplicated_hook, cgraph_2node_hook_list::hook, and cgraph_2node_hook_list::next.
Referenced by cgraph_clone_node(), cgraph_copy_node_for_versioning(), and cgraph_create_virtual_clone().
|
static |
Call all node removal hooks.
References cgraph_node_hook_list::data, first_cgraph_node_removal_hook, cgraph_node_hook_list::hook, and cgraph_node_hook_list::next.
Referenced by cgraph_remove_node().
bool cgraph_can_remove_if_no_direct_calls_and_refs_p | ( | ) |
Return true when function NODE can be removed from callgraph if all direct calls are eliminated.
References symtab_node_base::decl, symtab_node_base::externally_visible, symtab_node_base::force_output, symtab_node_base::forced_by_abi, cgraph_node::global, cgraph_global_info::inlined_to, cgraph_node::symbol, symtab_used_from_object_file_p(), and symtab_node_base::used_from_other_partition.
Referenced by nonremovable_p(), and symtab_remove_unreachable_nodes().
bool cgraph_can_remove_if_no_direct_calls_p | ( | ) |
Return true when function NODE and its aliases can be removed from callgraph if all direct calls are eliminated.
References symtab_node_base::address_taken, cgraph_for_node_and_aliases(), symtab_node_base::decl, nonremovable_p(), and cgraph_node::symbol.
Referenced by can_remove_node_now_p_1(), cgraph_will_be_removed_from_program_if_no_direct_calls(), do_estimate_growth(), and want_inline_small_function_p().
|
read |
Create edge from CALLER to CALLEE in the cgraph.
References cgraph_node::callees, cgraph_node::callers, cgraph_create_edge_1(), cgraph_edge::indirect_unknown_callee, initialize_inline_failed(), cgraph_edge::next_callee, cgraph_edge::next_caller, cgraph_edge::prev_callee, and cgraph_edge::prev_caller.
Referenced by analyze_function(), build_cgraph_edges(), cgraph_clone_edge(), cgraph_create_edge_including_clones(), cgraph_turn_edge_to_speculative(), cgraph_update_edges_for_call_stmt_node(), copy_bb(), gen_emutls_addr(), input_edge(), ipa_tm_insert_gettmclone_call(), ipa_tm_insert_irr_call(), and rebuild_cgraph_edges().
|
staticread |
Allocate a cgraph_edge structure and fill it with data according to the parameters of which only CALLEE can be NULL (when creating an indirect call edge).
References cgraph_edge::aux, cgraph_node::call_site_hash, cgraph_edge::call_stmt, cgraph_edge::call_stmt_cannot_inline_p, cgraph_edge::callee, cgraph_edge::caller, cgraph_edge::can_throw_external, cgraph_add_edge_to_call_site_hash(), cgraph_edge_max_uid, count, cgraph_edge::count, symtab_node_base::decl, free_edges, cgraph_edge::frequency, gimple_check_call_matching_types(), cgraph_edge::indirect_info, cgraph_edge::indirect_inlining_edge, is_gimple_call(), cgraph_edge::lto_stmt_uid, cgraph_edge::next_callee, cgraph_edge::next_caller, pop_cfun(), cgraph_edge::prev_callee, cgraph_edge::prev_caller, push_cfun(), cgraph_edge::speculative, stmt_can_throw_external(), cgraph_node::symbol, and cgraph_edge::uid.
Referenced by cgraph_create_edge(), and cgraph_create_indirect_edge().
|
read |
Allocate new callgraph node and insert it into basic data structures.
References cgraph_allocate_node(), cgraph_n_nodes, cgraph_node::count_materialization_scale, NODE_FREQUENCY_NORMAL, cgraph_node::symbol, and SYMTAB_FUNCTION.
Referenced by cgraph_clone_node(), cgraph_create_node(), and input_node().
|
read |
Mark ALIAS as an alias to DECL. DECL_NODE is cgraph node representing the function body is associated with (not necessarily cgraph_node (DECL).
References symtab_node_base::alias, symtab_node_base::alias_target, cgraph_get_create_node(), symtab_node_base::definition, lookup_attribute(), cgraph_node::symbol, and symtab_node_base::weakref.
Referenced by cgraph_same_body_alias(), handle_alias_pairs(), and symtab_nonoverwritable_alias().
|
read |
Create an indirect edge with a yet-undetermined callee where the call statement destination is a formal parameter of the caller with index PARAM_INDEX.
References cgraph_allocate_init_indirect_info(), cgraph_create_edge_1(), cgraph_indirect_call_info::ecf_flags, gimple_call_fn(), cgraph_node::indirect_calls, cgraph_edge::indirect_info, cgraph_edge::indirect_unknown_callee, initialize_inline_failed(), cgraph_edge::next_callee, obj_type_ref_class(), cgraph_indirect_call_info::otr_token, cgraph_indirect_call_info::otr_type, cgraph_indirect_call_info::param_index, cgraph_indirect_call_info::polymorphic, cgraph_edge::prev_callee, tree_low_cst(), type(), and virtual_method_call_p().
Referenced by build_cgraph_edges(), cgraph_clone_edge(), input_edge(), and rebuild_cgraph_edges().
|
read |
Return cgraph node assigned to DECL. Create new one when needed.
References cgraph_create_empty_node(), cgraph_get_create_node(), symtab_node_base::decl, cgraph_node::symbol, and symtab_register_node().
Referenced by cgraph_add_new_function(), cgraph_add_thunk(), cgraph_copy_node_for_versioning(), cgraph_get_create_node(), cgraph_get_create_real_symbol_node(), and expand_call_tm().
|
static |
Switch to THIS_CFUN if needed and print STMT to stderr.
References cfun, current_function_decl, debug_gimple_stmt(), and set_cfun().
Referenced by verify_cgraph_node().
|
read |
Return the callgraph edge representing the GIMPLE_CALL statement CALL_STMT.
References cgraph_node::call_site_hash, cgraph_edge::call_stmt, cgraph_node::callees, cgraph_add_edge_to_call_site_hash(), edge_eq(), edge_hash(), cgraph_node::indirect_calls, and cgraph_edge::next_callee.
Referenced by cgraph_create_edge_including_clones(), cgraph_set_call_stmt_including_clones(), cgraph_speculative_call_info(), cgraph_update_edges_for_call_stmt_node(), copy_bb(), estimate_function_body_sizes(), expand_call_inline(), ipa_note_param_call(), ipa_profile_generate_summary(), ipa_tm_transform_calls_redirect(), redirect_all_calls(), update_call_edge_frequencies(), and verify_cgraph_node().
bool cgraph_edge_cannot_lead_to_return | ( | ) |
Return true when call of E can not lead to return from caller and thus it is safe to ignore its side effects for IPA analysis when computing side effects of the caller. FIXME: We could actually mark all edges that have no reaching patch to EXIT_BLOCK_PTR or throw to get better results.
References cgraph_edge::callee, cgraph_edge::caller, cgraph_node_cannot_return(), cgraph_indirect_call_info::ecf_flags, cgraph_edge::indirect_info, and cgraph_edge::indirect_unknown_callee.
Referenced by get_read_write_all_from_node(), propagate_bits(), and propagate_pure_const().
|
inlinestatic |
Referenced by cgraph_node_remove_callees(), cgraph_redirect_edge_callee(), and cgraph_remove_edge().
|
inlinestatic |
Remove the edge E from the list of the callers of the callee.
References cgraph_edge::callee, cgraph_node::callers, cgraph_edge::indirect_unknown_callee, cgraph_edge::next_caller, and cgraph_edge::prev_caller.
|
inlinestatic |
Referenced by cgraph_node_remove_callers(), and cgraph_remove_edge().
|
inlinestatic |
Remove the edge E from the list of the callees of the caller.
References cgraph_node::call_site_hash, cgraph_edge::call_stmt, cgraph_node::callees, cgraph_edge::caller, cgraph_node::indirect_calls, cgraph_edge::indirect_unknown_callee, cgraph_edge::next_callee, and cgraph_edge::prev_callee.
|
static |
eq function for cgraph_fnver_htab.
References cgraph_function_version_info::this_node, and cgraph_node::uid.
Referenced by insert_new_cgraph_node_version().
|
static |
Hash function for cgraph_fnver_htab.
Referenced by insert_new_cgraph_node_version().
bool cgraph_for_node_and_aliases | ( | struct cgraph_node * | node, |
bool(*)(struct cgraph_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_for_node_and_aliases(), cgraph_function_body_availability(), IPA_REF_ALIAS, ipa_ref_referring_node(), symtab_node_base::ref_list, and cgraph_node::symbol.
Referenced by cgraph_can_remove_if_no_direct_calls_p(), cgraph_for_node_and_aliases(), cgraph_local_node_p(), cgraph_node_can_be_local_p(), cgraph_only_called_directly_p(), cgraph_propagate_frequency(), cgraph_will_be_removed_from_program_if_no_direct_calls(), collect_callers_of_node(), convert_callers(), do_estimate_growth(), estimate_local_effects(), gather_caller_stats(), has_undead_caller_from_outside_scc_p(), identify_dead_nodes(), ipa_early_sra(), ipa_pta_execute(), ipa_tm_create_version(), ipcp_cloning_candidate_p(), symtab_remove_unreachable_nodes(), update_profiling_info(), and want_inline_function_to_all_callers_p().
bool cgraph_for_node_thunks_and_aliases | ( | struct cgraph_node * | node, |
bool(*)(struct cgraph_node *, void *) | callback, | ||
void * | data, | ||
bool | include_overwritable | ||
) |
Call calback on NODE, thunks and aliases associated to NODE. When INCLUDE_OVERWRITABLE is false, overwritable aliases and thunks are skipped.
References AVAIL_OVERWRITABLE, cgraph_edge::caller, cgraph_node::callers, cgraph_for_node_thunks_and_aliases(), cgraph_function_body_availability(), IPA_REF_ALIAS, ipa_ref_referring_node(), cgraph_edge::next_caller, symtab_node_base::ref_list, cgraph_node::symbol, cgraph_node::thunk, and cgraph_thunk_info::thunk_p.
Referenced by cgraph_for_node_thunks_and_aliases(), cgraph_make_node_local(), cgraph_set_const_flag(), cgraph_set_nothrow_flag(), and cgraph_set_pure_flag().
|
static |
Put the edge onto the free list.
References free_edges, ggc_free(), cgraph_edge::indirect_info, memset(), and cgraph_edge::uid.
Referenced by cgraph_node_remove_callees(), cgraph_node_remove_callers(), and cgraph_remove_edge().
enum availability cgraph_function_body_availability | ( | ) |
Return function availability. See cgraph.h for description of individual return values.
References symtab_node_base::analyzed, AVAIL_AVAILABLE, AVAIL_LOCAL, AVAIL_NOT_AVAILABLE, AVAIL_OVERWRITABLE, symtab_node_base::decl, decl_replaceable_p(), symtab_node_base::externally_visible, cgraph_local_info::local, cgraph_node::local, and cgraph_node::symbol.
Referenced by add_new_function(), cgraph_for_node_and_aliases(), cgraph_for_node_thunks_and_aliases(), cgraph_function_node(), cgraph_make_node_local_1(), determine_versionability(), dump_cgraph_node(), generate_summary(), get_read_write_all_from_node(), ipa_profile(), ipa_reduced_postorder(), ipa_tm_create_version(), ipa_tm_execute(), ipa_tm_mayenterirr_function(), propagate(), propagate_nothrow(), propagate_pure_const(), pure_const_generate_summary(), read_write_all_from_decl(), set_nothrow_function_flags(), skip_function_for_local_pure_const(), and symtab_node_availability().
|
read |
Given NODE, walk the alias chain to return the function NODE is alias of. Walk through thunk, too. When AVAILABILITY is non-NULL, get minimal availability in the chain.
References cgraph_edge::callee, cgraph_node::callees, cgraph_function_body_availability(), cgraph_function_or_thunk_node(), cgraph_node::thunk, and cgraph_thunk_info::thunk_p.
Referenced by edge_within_scc(), function_and_variable_visibility(), get_read_write_all_from_node(), ipa_reference_get_not_read_global(), ipa_reverse_postorder(), perhaps_add_new_callers(), propagate_bits(), propagate_constants_accross_call(), propagate_nothrow(), propagate_pure_const(), self_recursive_p(), spread_undeadness(), and tree_could_trap_p().
bool cgraph_function_possibly_inlined_p | ( | ) |
Return true when the DECL can possibly be inlined.
References cgraph_global_info_ready.
Referenced by gen_decl_die(), gen_subprogram_die(), and gimple_expand_cfg().
bool cgraph_get_body | ( | ) |
When doing LTO, read NODE's body from disk if it is not already present.
References symtab_node_base::decl, dump_cgraph_node(), fatal_error(), lto_file_decl_data::file_name, len, symtab_node_base::lto_file_data, lto_free_section_data(), lto_get_decl_name_mapping(), lto_get_section_data(), lto_input_function_body(), LTO_section_function_body, lto_stats, lto_stats_d::num_function_bodies, and cgraph_node::symbol.
Referenced by cgraph_materialize_all_clones(), do_per_function_toporder(), expand_call_inline(), expand_function(), and ipa_pta_execute().
|
read |
Try to find a call graph node for declaration DECL and if it does not exist, create it.
References cgraph_create_node(), and cgraph_get_node().
Referenced by assemble_alias(), build_cgraph_edges(), cgraph_add_new_function(), cgraph_create_function_alias(), cgraph_create_node(), cgraph_finalize_function(), cgraph_process_same_body_aliases(), cgraph_update_edges_for_call_stmt_node(), gimple_get_virt_method_for_binfo(), input_function(), ipa_make_edge_direct_to_target(), ipa_tm_insert_gettmclone_call(), ipa_tm_insert_irr_call(), ipa_tm_transform_calls_redirect(), lower_emutls_function_body(), mark_decl_referenced(), rebuild_cgraph_edges(), and record_function_versions().
|
read |
Create external decl node for DECL. The difference i nbetween cgraph_get_create_node and cgraph_get_create_real_symbol_node is that cgraph_get_create_node may return inline clone, while cgraph_get_create_real_symbol_node will create a new node in this case. FIXME: This function should be removed once clones are put out of decl hash.
References cgraph_create_node(), cgraph_get_node(), cgraph_node_name(), cgraph_node::clone_of, cgraph_node::clones, dump_file, cgraph_node::global, cgraph_global_info::inlined_to, symtab_node_base::order, cgraph_node::symbol, symtab_insert_node_to_hashtable(), and symtab_prevail_in_asm_name_hash().
Referenced by build_cgraph_edges(), canonicalize_constructor_val(), ipa_make_edge_direct_to_target(), mark_address(), mark_load(), record_eh_tables(), record_reference(), and symtab_remove_unreachable_nodes().
|
read |
Return local info for the compiled function.
References cgraph_get_node(), cgraph_global_info_ready, and cgraph_node::global.
const char* cgraph_inline_failed_string | ( | ) |
Return a string describing the failure REASON.
References CIF_N_REASONS.
Referenced by dump_inline_edge_summary(), expand_call_inline(), and report_inline_failed_reason().
|
read |
Return local info for the compiled function.
References cgraph_get_node(), and cgraph_node::local.
Referenced by setup_incoming_promotions().
|
read |
Make an indirect EDGE with an unknown callee an ordinary edge leading to CALLEE. DELTA is an integer constant that is to be added to the this pointer (first parameter) to compensate for skipping a thunk adjustment.
References cgraph_edge::call_stmt, cgraph_edge::call_stmt_cannot_inline_p, cgraph_node::callees, cgraph_edge::caller, cgraph_resolve_speculation(), cgraph_set_edge_callee(), symtab_node_base::decl, ggc_free(), gimple_check_call_matching_types(), cgraph_node::indirect_calls, cgraph_edge::indirect_info, cgraph_edge::indirect_unknown_callee, initialize_inline_failed(), cgraph_edge::next_callee, cgraph_edge::prev_callee, cgraph_edge::speculative, and cgraph_node::symbol.
Referenced by analyze_functions(), cgraph_set_call_stmt(), and ipa_make_edge_direct_to_target().
void cgraph_make_node_local | ( | ) |
Bring NODE local.
References cgraph_for_node_thunks_and_aliases(), and cgraph_make_node_local_1().
Referenced by modify_function().
|
static |
Worker to bring NODE local.
References AVAIL_LOCAL, cgraph_function_body_availability(), cgraph_node_can_be_local_p(), symtab_node_base::decl, symtab_node_base::externally_visible, symtab_node_base::forced_by_abi, cgraph_local_info::local, cgraph_node::local, cgraph_node::symbol, symtab_make_decl_local(), and symtab_node_base::unique_name.
Referenced by cgraph_make_node_local().
void cgraph_mark_address_taken_node | ( | ) |
Likewise indicate that a node is having address taken.
References symtab_node_base::address_taken, function::after_inlining, cgraph_node::callers, cfun, cgraph_function_or_thunk_node(), cgraph_node::global, cgraph_edge::indirect_inlining_edge, cgraph_global_info::inlined_to, and cgraph_node::symbol.
Referenced by cgraph_turn_edge_to_speculative(), ipa_tm_insert_gettmclone_call(), lto_cgraph_replace_node(), mark_address(), mark_load(), record_eh_tables(), and record_reference().
bool cgraph_node_can_be_local_p | ( | ) |
Return true if NODE can be made local for API change. Extern inline functions and C++ COMDAT functions can be made local at the expense of possible code size growth if function is used in multiple compilation units.
References symtab_node_base::address_taken, cgraph_for_node_and_aliases(), cgraph_node_cannot_be_local_p_1(), and cgraph_node::symbol.
Referenced by cgraph_make_node_local_1(), and ipa_sra_preliminary_function_checks().
|
static |
Worker for cgraph_node_can_be_local_p.
References symtab_node_base::decl, symtab_node_base::force_output, symtab_node_base::forced_by_abi, cgraph_node::symbol, and symtab_used_from_object_file_p().
Referenced by cgraph_node_can_be_local_p().
bool cgraph_node_cannot_return | ( | ) |
Return true when NODE can not return or throw and thus it is safe to ignore its side effects for IPA analysis.
References symtab_node_base::decl, flags_from_decl_or_type(), and cgraph_node::symbol.
Referenced by analyze_function(), cgraph_edge_cannot_lead_to_return(), ipa_ref_cannot_lead_to_return(), propagate(), and read_write_all_from_decl().
|
read |
Return the cgraph node that has ASMNAME for its DECL_ASSEMBLER_NAME. Return NULL if there's no such node.
References dyn_cast(), cgraph_node::global, cgraph_global_info::inlined_to, and symtab_node_for_asm().
void cgraph_node_remove_callees | ( | ) |
Remove all callees from the node.
References cgraph_node::call_site_hash, cgraph_node::callees, cgraph_call_edge_removal_hooks(), cgraph_edge_remove_callee(), cgraph_free_edge(), cgraph_node::indirect_calls, cgraph_edge::indirect_unknown_callee, and cgraph_edge::next_callee.
Referenced by cgraph_materialize_all_clones(), cgraph_materialize_clone(), cgraph_remove_node(), cgraph_reset_node(), expand_function(), rebuild_cgraph_edges(), remove_cgraph_callee_edges(), split_function(), and symtab_remove_unreachable_nodes().
|
static |
@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/.
This file contains basic routines manipulating call graph The call-graph is a data structure designed for intra-procedural optimization. It represents a multi-graph where nodes are functions and edges are call sites.
FIXME: Only for PROP_loops, but cgraph shouldn't have to know about this.
Referenced by cgraph_remove_node().
|
static |
Remove all callers from the node.
References cgraph_node::callers, cgraph_call_edge_removal_hooks(), cgraph_edge_remove_caller(), cgraph_free_edge(), and cgraph_edge::next_caller.
|
static |
Worker for cgraph_only_called_directly_p.
References cgraph_only_called_directly_or_aliased_p().
Referenced by cgraph_only_called_directly_p().
bool cgraph_only_called_directly_p | ( | ) |
Return true when function NODE and all its aliases are only called directly. i.e. it is not externally visible, address was not taken and it is not used in any other non-standard way.
References cgraph_for_node_and_aliases(), cgraph_function_or_thunk_node(), and cgraph_not_only_called_directly_p_1().
Referenced by cgraph_will_be_removed_from_program_if_no_direct_calls(), gimple_gen_ic_func_profiler(), init_node_map(), and ipa_reverse_postorder().
bool cgraph_propagate_frequency | ( | ) |
See if the frequency of NODE can be updated based on frequencies of its callers.
References symtab_node_base::analyzed, cgraph_for_node_and_aliases(), cgraph_node_name(), cgraph_propagate_frequency_1(), changed, symtab_node_base::decl, dump_file, dump_flags, cgraph_local_info::local, cgraph_node::local, cgraph_propagate_frequency_data::maybe_executed_once, cgraph_propagate_frequency_data::maybe_unlikely_executed, NODE_FREQUENCY_EXECUTED_ONCE, NODE_FREQUENCY_HOT, NODE_FREQUENCY_UNLIKELY_EXECUTED, cgraph_node::only_called_at_exit, cgraph_propagate_frequency_data::only_called_at_exit, cgraph_node::only_called_at_startup, cgraph_propagate_frequency_data::only_called_at_startup, and cgraph_node::symbol.
Referenced by inline_update_callee_summaries(), ipa_profile(), and symtab_remove_unreachable_nodes().
|
static |
Worker for cgraph_propagate_frequency_1.
References cgraph_edge::caller, cgraph_node::callers, cgraph_node_name(), symtab_node_base::decl, dump_file, dump_flags, cgraph_edge::frequency, inline_edge_summary::loop_depth, cgraph_propagate_frequency_data::maybe_executed_once, cgraph_propagate_frequency_data::maybe_unlikely_executed, cgraph_edge::next_caller, NODE_FREQUENCY_EXECUTED_ONCE, NODE_FREQUENCY_HOT, NODE_FREQUENCY_NORMAL, NODE_FREQUENCY_UNLIKELY_EXECUTED, cgraph_node::only_called_at_exit, cgraph_propagate_frequency_data::only_called_at_exit, cgraph_node::only_called_at_startup, cgraph_propagate_frequency_data::only_called_at_startup, and cgraph_node::symbol.
Referenced by cgraph_propagate_frequency().
gimple cgraph_redirect_edge_call_stmt_to_callee | ( | ) |
If necessary, change the function declaration in the call statement associated with E so that it corresponds to the edge callee.
References add_stmt_to_eh_lp(), cgraph_node::call_site_hash, cgraph_edge::call_stmt, cgraph_edge::callee, cgraph_edge::caller, cgraph(), cgraph_dump_file, cgraph_get_node(), cgraph_node_name(), cgraph_resolve_speculation(), cgraph_set_call_stmt_including_clones(), cgraph_speculative_call_info(), cgraph_update_edge_in_call_site_hash(), cgraph_node::clone, cgraph_clone_info::combined_args_to_skip, compute_call_stmt_bb_frequency(), basic_block_def::count, cgraph_edge::count, symtab_node_base::decl, dump_bitmap(), dump_file, dump_flags, cgraph_edge::frequency, gimple_bb(), gimple_call_copy_skip_args(), gimple_call_fndecl(), gimple_call_fntype(), gimple_call_set_fndecl(), gimple_call_set_fntype(), gimple_check_call_matching_types(), gimple_ic(), gimple_vdef(), gsi_for_stmt(), gsi_replace(), HOST_WIDEST_INT, HOST_WIDEST_INT_PRINT_DEC, cgraph_edge::indirect_unknown_callee, lookup_stmt_eh_lp(), symtab_node_base::order, pop_cfun(), print_gimple_stmt(), push_cfun(), ipa_ref::referred, remove_stmt_from_eh_lp(), ipa_ref::speculative, cgraph_edge::speculative, ipa_ref::stmt, cgraph_node::symbol, and update_stmt().
Referenced by analyze_functions(), function_and_variable_visibility(), inline_transform(), and redirect_all_calls().
void cgraph_redirect_edge_callee | ( | ) |
Redirect callee of E to N. The function does not update underlying call expression.
References cgraph_edge_remove_callee(), and cgraph_set_edge_callee().
Referenced by cgraph_clone_node(), cgraph_copy_node_for_versioning(), clone_inlined_nodes(), function_and_variable_visibility(), inline_call(), ipa_tm_transform_calls_redirect(), lto_cgraph_replace_node(), perhaps_add_new_callers(), and recursive_inlining().
void cgraph_release_function_body | ( | ) |
Release memory used to represent body of function NODE. Use this only for functions that are released before being translated to target code (i.e. RTL). Functions that are compiled to RTL and beyond are free'd in final.c via free_after_compilation().
References CGRAPH_STATE_PARSING, symtab_node_base::decl, cgraph_node::ipa_transforms_to_apply, release_function_body(), cgraph_node::symbol, and cgraph_node::used_as_abstract_origin.
Referenced by cgraph_materialize_clone(), cgraph_remove_node(), expand_function(), free_lang_data_in_decl(), lto_cgraph_replace_node(), and symtab_remove_unreachable_nodes().
void cgraph_remove_edge | ( | ) |
Remove the edge E in the cgraph.
References cgraph_call_edge_removal_hooks(), cgraph_edge_remove_callee(), cgraph_edge_remove_caller(), cgraph_free_edge(), and cgraph_edge::indirect_unknown_callee.
Referenced by cgraph_remove_node_and_inline_clones(), cgraph_resolve_speculation(), cgraph_update_edges_for_call_stmt_node(), and delete_unreachable_blocks_update_callgraph().
void cgraph_remove_edge_duplication_hook | ( | ) |
Remove ENTRY from the list of hooks called on duplicating edges.
References first_cgraph_edge_duplicated_hook, free(), and cgraph_2edge_hook_list::next.
Referenced by inline_free_summary(), ipa_unregister_cgraph_hooks(), and ipcp_driver().
void cgraph_remove_edge_removal_hook | ( | ) |
Remove ENTRY from the list of hooks called on removing edges.
References first_cgraph_edge_removal_hook, free(), and cgraph_edge_hook_list::next.
Referenced by inline_free_summary(), inline_small_functions(), and ipa_unregister_cgraph_hooks().
void cgraph_remove_function_insertion_hook | ( | ) |
Remove ENTRY from the list of hooks called on inserted nodes.
References first_cgraph_function_insertion_hook, free(), and cgraph_node_hook_list::next.
Referenced by inline_free_summary(), ipa_unregister_cgraph_hooks(), and propagate().
void cgraph_remove_node | ( | ) |
Remove the node from cgraph.
References symtab_node_base::analyzed, cgraph_call_node_removal_hooks(), cgraph_get_node(), cgraph_global_info_ready, CGRAPH_LTO_STREAMING, cgraph_n_nodes, cgraph_node_remove_callees(), cgraph_node_remove_callers(), cgraph_release_function_body(), cgraph_node::clone_of, cgraph_node::clones, symtab_node_base::decl, symtab_node_base::force_output, symtab_node_base::forced_by_abi, free_nodes, cgraph_node::global, symtab_node_base::in_other_partition, cgraph_global_info::inlined_to, cgraph_node::ipa_transforms_to_apply, memset(), cgraph_node::nested, cgraph_node::next_nested, cgraph_node::next_sibling_clone, cgraph_node::origin, cgraph_node::prev_sibling_clone, cgraph_node::symbol, SYMTAB_FUNCTION, symtab_unregister_node(), and cgraph_node::uid.
Referenced by cgraph_add_thunk(), cgraph_remove_node_and_inline_clones(), delete_function_version(), expand_call_inline(), inline_call(), lto_cgraph_replace_node(), lto_symtab_merge_symbols(), recursive_inlining(), symtab_remove_node(), and symtab_remove_unreachable_nodes().
void cgraph_remove_node_duplication_hook | ( | ) |
Remove ENTRY from the list of hooks called on duplicating nodes.
References first_cgraph_node_duplicated_hook, free(), and cgraph_2node_hook_list::next.
Referenced by inline_free_summary(), ipa_unregister_cgraph_hooks(), and propagate().
void cgraph_remove_node_removal_hook | ( | ) |
Remove ENTRY from the list of hooks called on removing nodes.
References first_cgraph_node_removal_hook, free(), and cgraph_node_hook_list::next.
Referenced by inline_free_summary(), ipa_unregister_cgraph_hooks(), and propagate().
|
read |
Speculative call EDGE turned out to be direct call to CALLE_DECL. Remove the speculative call sequence and return edge representing the call. It is up to caller to redirect the call as appropriate.
References cgraph_node::call_site_hash, cgraph_edge::callee, cgraph_edge::caller, cgraph_node_name(), cgraph_remove_edge(), cgraph_remove_node_and_inline_clones(), cgraph_speculative_call_info(), cgraph_update_edge_in_call_site_hash(), cgraph_edge::count, dump_file, cgraph_edge::frequency, cgraph_edge::indirect_unknown_callee, cgraph_edge::inline_failed, ipa_remove_reference(), symtab_node_base::order, print_generic_expr(), ipa_ref::referred, cgraph_edge::speculative, and cgraph_node::symbol.
Referenced by cgraph_make_edge_direct(), cgraph_redirect_edge_call_stmt_to_callee(), clone_inlined_nodes(), inline_small_functions(), ipa_inline(), and resolve_noninline_speculation().
|
read |
Return local info for the compiled function.
References cgraph_get_node(), current_function_decl, symtab_node_base::decl, cgraph_node::rtl, and cgraph_node::symbol.
Referenced by expand_call(), and rest_of_clean_state().
|
read |
Attempt to mark ALIAS as an alias to DECL. Return alias node if successful and NULL otherwise. Same body aliases are output whenever the body of DECL is output, and cgraph_get_node (ALIAS) transparently returns cgraph_get_node (DECL).
References cgraph_create_function_alias(), cgraph_get_node(), cgraph_global_info_ready, symtab_node_base::cpp_implicit_alias, cpp_implicit_aliases_done, cgraph_node::symbol, and symtab_resolve_alias().
Referenced by ipa_tm_create_version_alias().
void cgraph_set_call_stmt | ( | struct cgraph_edge * | e, |
gimple | new_stmt, | ||
bool | update_speculative | ||
) |
Change field call_stmt of edge E to NEW_STMT. If UPDATE_SPECULATIVE and E is any component of speculative edge, then update all components.
References cgraph_node::call_site_hash, cgraph_edge::call_stmt, cgraph_edge::caller, cgraph_edge::can_throw_external, cgraph_add_edge_to_call_site_hash(), cgraph_get_node(), cgraph_make_edge_direct(), cgraph_set_call_stmt(), cgraph_speculative_call_info(), symtab_node_base::decl, gimple_call_fndecl(), cgraph_edge::indirect_unknown_callee, pop_cfun(), push_cfun(), cgraph_edge::speculative, ipa_ref::stmt, stmt_can_throw_external(), and cgraph_node::symbol.
Referenced by cgraph_create_edge_including_clones(), cgraph_set_call_stmt(), cgraph_set_call_stmt_including_clones(), cgraph_update_edges_for_call_stmt_node(), copy_bb(), and ipa_modify_call_arguments().
void cgraph_set_const_flag | ( | ) |
Set TREE_READONLY on NODE's decl and on aliases of NODE if any to READONLY.
References cgraph_for_node_thunks_and_aliases(), and cgraph_set_const_flag_1().
Referenced by local_pure_const(), propagate_pure_const(), and tree_profiling().
|
static |
Worker to set const flag.
References symtab_node_base::decl, and cgraph_node::symbol.
Referenced by cgraph_set_const_flag().
|
static |
Set callee of call graph edge E and add it to the corresponding set of callers.
References cgraph_edge::callee, cgraph_node::callers, cgraph_edge::next_caller, and cgraph_edge::prev_caller.
Referenced by cgraph_make_edge_direct(), and cgraph_redirect_edge_callee().
void cgraph_set_nothrow_flag | ( | ) |
Set TREE_NOTHROW on NODE's decl and on aliases of NODE if any to NOTHROW.
References cgraph_for_node_thunks_and_aliases(), and cgraph_set_nothrow_flag_1().
Referenced by local_pure_const(), propagate_nothrow(), and set_nothrow_function_flags().
|
static |
Worker to set nothrow flag.
References cgraph_node::callers, cgraph_edge::can_throw_external, symtab_node_base::decl, cgraph_edge::next_caller, and cgraph_node::symbol.
Referenced by cgraph_set_nothrow_flag().
void cgraph_set_pure_flag | ( | ) |
Set DECL_PURE_P on NODE's decl and on aliases of NODE if any to PURE.
References cgraph_for_node_thunks_and_aliases(), and cgraph_set_pure_flag_1().
Referenced by local_pure_const(), propagate_pure_const(), and tree_profiling().
|
static |
Worker to set pure flag.
References symtab_node_base::decl, and cgraph_node::symbol.
Referenced by cgraph_set_pure_flag().
void cgraph_speculative_call_info | ( | struct cgraph_edge * | e, |
struct cgraph_edge *& | direct, | ||
struct cgraph_edge *& | indirect, | ||
struct ipa_ref *& | reference | ||
) |
Speculative call consist of three components: 1) an indirect edge representing the original call 2) an direct edge representing the new call 3) ADDR_EXPR reference representing the speculative check. All three components are attached to single statement (the indirect call) and if one of them exists, all of them must exist. Given speculative call edge E, return all three components.
References cgraph_edge::call_stmt, cgraph_node::callees, cgraph_edge::caller, cgraph_edge(), cgraph_node::indirect_calls, cgraph_edge::indirect_unknown_callee, ipa_ref::lto_stmt_uid, cgraph_edge::lto_stmt_uid, cgraph_edge::next_callee, symtab_node_base::ref_list, ipa_ref::speculative, cgraph_edge::speculative, ipa_ref::stmt, and cgraph_node::symbol.
Referenced by cgraph_redirect_edge_call_stmt_to_callee(), cgraph_resolve_speculation(), cgraph_set_call_stmt(), cgraph_set_call_stmt_including_clones(), copy_bb(), and speculation_useful_p().
|
read |
Turn edge E into speculative call calling N2. Update the profile so the direct call is taken COUNT times with FREQUENCY. At clone materialization time, the indirect call E will be expanded as: if (call_dest == N2) n2 (); else call call_dest At this time the function just creates the direct call, the referencd representing the if conditional and attaches them all to the orginal indirect call statement. Return direct edge created.
References cgraph_edge::call_stmt, cgraph_edge::caller, cgraph_edge::can_throw_external, cgraph_call_edge_duplication_hooks(), cgraph_create_edge(), cgraph_mark_address_taken_node(), cgraph_node_name(), cgraph_edge::count, symtab_node_base::decl, dump_file, cgraph_edge::frequency, initialize_inline_failed(), ipa_record_reference(), IPA_REF_ADDR, ipa_ref::lto_stmt_uid, cgraph_edge::lto_stmt_uid, symtab_node_base::order, ipa_ref::speculative, cgraph_edge::speculative, and cgraph_node::symbol.
Referenced by ipa_profile().
void cgraph_unnest_node | ( | ) |
NODE is no longer nested function; update cgraph accordingly.
References cgraph_node::nested, cgraph_node::next_nested, and cgraph_node::origin.
Referenced by unnest_nesting_tree_1().
|
inlinestatic |
Add call graph edge E to call site hash of its caller.
References cgraph_node::call_site_hash, cgraph_edge::call_stmt, and cgraph_edge::caller.
Referenced by cgraph_redirect_edge_call_stmt_to_callee(), and cgraph_resolve_speculation().
void cgraph_update_edges_for_call_stmt | ( | ) |
Update or remove the corresponding cgraph edge if a GIMPLE_CALL OLD_STMT changed into NEW_STMT. OLD_DECL is gimple_call_fndecl of OLD_STMT before it was updated (updating can happen inplace).
References cfun, cgraph_get_node(), cgraph_update_edges_for_call_stmt_node(), cgraph_node::clone_of, cgraph_node::clones, function::decl, and cgraph_node::next_sibling_clone.
Referenced by fold_marked_statements().
|
static |
Update or remove the corresponding cgraph edge if a GIMPLE_CALL OLD_STMT changed into NEW_STMT. OLD_CALL is gimple_call_fndecl of OLD_STMT if it was previously call statement. If NEW_STMT is NULL, the call has been dropped without any replacement.
References cgraph_edge::callee, cgraph_create_edge(), cgraph_edge(), cgraph_get_create_node(), cgraph_remove_edge(), cgraph_set_call_stmt(), cgraph_node::clone_of, compute_call_stmt_bb_frequency(), count, basic_block_def::count, cgraph_edge::count, current_function_decl, symtab_node_base::decl, cgraph_node::former_clone_of, frequency, cgraph_edge::frequency, gimple_bb(), gimple_call_fndecl(), cgraph_edge::inline_failed, is_gimple_call(), and cgraph_node::symbol.
Referenced by cgraph_update_edges_for_call_stmt().
bool cgraph_will_be_removed_from_program_if_no_direct_calls | ( | ) |
Return true when function NODE can be expected to be removed from program when direct calls in this compilation unit are removed. As a special case COMDAT functions are cgraph_can_remove_if_no_direct_calls_p while the are not cgraph_only_called_directly_p (it is possible they are called from other unit) This function behaves as cgraph_only_called_directly_p because eliminating all uses of COMDAT function does not make it necessarily disappear from the program unless we are compiling whole program or we do LTO. In this case we know we win since dynamic linking will not really discard the linkonce section.
References cgraph_can_remove_if_no_direct_calls_p(), cgraph_for_node_and_aliases(), cgraph_only_called_directly_p(), symtab_node_base::decl, cgraph_node::global, cgraph_global_info::inlined_to, cgraph_node::symbol, and used_from_object_file_p().
Referenced by do_estimate_growth(), estimate_local_effects(), and identify_dead_nodes().
|
static |
Return TRUE if NODE2 is equivalent to NODE or its clone.
References cgraph_function_or_thunk_node(), and cgraph_node::clone_of.
Referenced by verify_edge_corresponds_to_fndecl().
vec<cgraph_edge_p> collect_callers_of_node | ( | ) |
Collect all callers of NODE and its aliases that are known to lead to NODE (i.e. are not overwritable).
References cgraph_for_node_and_aliases(), collect_callers_of_node_1(), and vNULL.
Referenced by decide_whether_version_node(), and modify_function().
|
static |
Collect all callers of NODE. Worker for collect_callers_of_node.
References AVAIL_OVERWRITABLE, cgraph_node::callers, cgraph_function_or_thunk_node(), cgraph_edge::indirect_inlining_edge, and cgraph_edge::next_caller.
Referenced by collect_callers_of_node().
DEBUG_FUNCTION void debug_cgraph | ( | void | ) |
Dump the call graph to stderr.
References dump_cgraph().
DEBUG_FUNCTION void debug_cgraph_node | ( | ) |
Dump call graph node NODE to stderr.
References dump_cgraph_node().
void delete_function_version | ( | ) |
Remove the cgraph_function_version_info and cgraph_node for DECL. This DECL is a duplicate declaration.
References cgraph_fnver_htab, cgraph_get_node(), cgraph_remove_node(), get_cgraph_node_version(), cgraph_function_version_info::next, and cgraph_function_version_info::prev.
void dump_cgraph | ( | ) |
Dump the callgraph to file F.
References dump_cgraph_node().
Referenced by debug_cgraph(), propagate(), propagate_nothrow(), and propagate_pure_const().
void dump_cgraph_node | ( | ) |
Dump call graph node NODE to file F.
References cgraph_edge::callee, cgraph_edge::caller, cgraph_edge::can_throw_external, cgraph_function_body_availability(), cgraph_function_flags_ready, cgraph_node_asm_name(), cgraph_node_name(), cgraph_edge::count, lang_hooks::decl_printable_name, dump_symtab_base(), cgraph_edge::frequency, gimple_has_body_p(), HOST_WIDEST_INT, HOST_WIDEST_INT_PRINT_DEC, cgraph_edge::indirect_inlining_edge, cgraph_edge::inline_failed, cgraph_edge::next_callee, cgraph_edge::next_caller, symtab_node_base::order, cgraph_edge::speculative, and cgraph_node::symbol.
Referenced by cgraph_get_body(), compile(), debug_cgraph_node(), dump_cgraph(), dump_symtab_node(), function_called_by_processed_nodes_p(), ipa_print_order(), mark_functions_to_output(), and verify_cgraph_node().
|
static |
Return nonzero if the call_stmt of of cgraph_edge X is stmt *Y.
Referenced by cgraph_edge().
|
static |
Returns a hash value for X (which really is a cgraph_edge).
Referenced by cgraph_edge().
|
read |
Get the cgraph_function_version_info node corresponding to node.
References cgraph_fnver_htab, and cgraph_function_version_info::this_node.
Referenced by analyze_function(), delete_function_version(), and record_function_versions().
|
read |
Insert a new cgraph_function_version_info node into cgraph_fnver_htab corresponding to cgraph_node NODE.
References cgraph_fnver_htab, cgraph_fnver_htab_eq(), cgraph_fnver_htab_hash(), cgraph_function_version_info::this_node, and version_info_node.
Referenced by record_function_versions().
|
static |
Worker for cgraph_can_remove_if_no_direct_calls_p.
References cgraph_can_remove_if_no_direct_calls_and_refs_p().
Referenced by cgraph_can_remove_if_no_direct_calls_p().
void record_function_versions | ( | ) |
Record that DECL1 and DECL2 are semantically identical function versions.
References cgraph_get_create_node(), get_cgraph_node_version(), insert_new_cgraph_node_version(), cgraph_function_version_info::next, and cgraph_function_version_info::prev.
void release_function_body | ( | ) |
Helper function for cgraph_release_function_body and free_lang_data. It releases body from function DECL without having to inspect its possibly non-existent symtab node.
References function::cfg, cfun, clear_edges(), function::curr_properties, delete_tree_cfg_annotations(), delete_tree_ssa(), DOM_NONE, function::eh, free_histograms(), ggc_free(), function::gimple_df, gimple_set_body(), loop_optimizer_finalize(), pop_cfun(), push_cfun(), and function::value_histograms.
Referenced by cgraph_release_function_body(), and free_lang_data_in_decl().
|
static |
Worker for cgraph_can_remove_if_no_direct_calls_p.
References symtab_used_from_object_file_p().
Referenced by cgraph_will_be_removed_from_program_if_no_direct_calls().
DEBUG_FUNCTION void verify_cgraph | ( | void | ) |
Verify whole cgraph structure.
References seen_error(), and verify_cgraph_node().
Referenced by cgraph_materialize_all_clones(), and ipa_tm_execute().
DEBUG_FUNCTION void verify_cgraph_node | ( | ) |
Verify cgraph nodes of given cgraph node.
References cgraph_edge::aux, cgraph_edge::call_stmt, cgraph_edge::callee, cgraph_edge::caller, function::cfg, cgraph_debug_gimple_stmt(), cgraph_edge(), cgraph_node_name(), cgraph_node::clone_of, cgraph_node::clones, debug_tree(), symtab_node_base::decl, dump_cgraph_node(), error(), error_found, gimple_call_fndecl(), gimple_has_body_p(), cgraph_node::global, gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), identifier_to_locale(), cgraph_edge::indirect_info, cgraph_edge::indirect_unknown_callee, cgraph_edge::inline_failed, cgraph_global_info::inlined_to, internal_error(), IPA_REF_ALIAS, is_gimple_call(), cgraph_edge::next_callee, cgraph_edge::next_caller, cgraph_node::next_sibling_clone, pointer_set_contains(), pointer_set_create(), pointer_set_destroy(), pointer_set_insert(), seen_error(), cgraph_edge::speculative, ipa_ref::stmt, cgraph_node::symbol, timevar_pop(), timevar_push(), verify_edge_corresponds_to_fndecl(), verify_edge_count_and_frequency(), and verify_symtab_base().
Referenced by early_inliner(), expand_call_inline(), optimize_inline_calls(), save_inline_function_body(), verify_cgraph(), and verify_symtab_node().
|
static |
Verify that call graph edge E corresponds to DECL from the associated statement. Return true if the verification should fail.
References cgraph_edge::callee, cgraph_function_or_thunk_node(), cgraph_get_node(), CGRAPH_LTO_STREAMING, clone_of_p(), symtab_node_base::decl, cgraph_node::former_clone_of, cgraph_node::global, symtab_node_base::in_other_partition, cgraph_global_info::inlined_to, and cgraph_node::symbol.
Referenced by verify_cgraph_node().
|
static |
Verify edge E count and frequency.
References cgraph_edge::call_stmt, cgraph_edge::caller, compute_call_stmt_bb_frequency(), cgraph_edge::count, symtab_node_base::decl, error(), error_found, cgraph_edge::frequency, gimple_has_body_p(), cgraph_node::global, inline_edge_summary(), inline_edge_summary_vec, cgraph_global_info::inlined_to, inline_edge_summary::predicate, cgraph_edge::speculative, cgraph_node::symbol, and cgraph_edge::uid.
Referenced by verify_cgraph_node().
const char* const cgraph_availability_names[] |
Names used to print out the availability enum.
Referenced by dump_varpool_node().
int cgraph_edge_max_uid |
Maximal uid used in cgraph edges.
Referenced by cgraph_create_edge_1(), do_estimate_edge_time(), grow_next_edge_clone_vector(), initialize_growth_caches(), inline_summary_alloc(), and ipa_check_create_edge_args().
|
static |
Map a cgraph_node to cgraph_function_version_info using this htab. The cgraph_function_version_info has a THIS_NODE field that is the corresponding cgraph_node..
Referenced by delete_function_version(), get_cgraph_node_version(), and insert_new_cgraph_node_version().
bool cgraph_function_flags_ready = false |
Set when the cgraph is fully build and the basic flags are computed.
Referenced by can_refer_decl_in_current_unit_p(), cgraph_variable_initializer_availability(), dump_cgraph_node(), dump_varpool_node(), function_and_variable_visibility(), and varpool_analyze_node().
bool cgraph_global_info_ready = false |
Set when whole unit has been analyzed so we can access global info.
Referenced by assemble_alias(), cgraph_function_possibly_inlined_p(), cgraph_global_info(), cgraph_remove_node(), cgraph_same_body_alias(), compile(), expand_call_inline(), expand_function(), preserve_function_body_p(), reference_to_unused(), and wrapup_global_declaration_2().
int cgraph_max_uid |
Maximal uid used in cgraph nodes.
Referenced by cgraph_allocate_node(), create_specialized_node(), do_estimate_growth(), initialize_growth_caches(), inline_summary_alloc(), ipa_check_create_node_params(), and ipa_set_node_agg_value_chain().
int cgraph_n_nodes |
Number of nodes in existence.
Referenced by build_toporder_info(), cgraph_create_empty_node(), cgraph_remove_node(), do_per_function_toporder(), expand_all_functions(), inline_small_functions(), ipa_inline(), ipa_profile(), ipa_reduced_postorder(), ipa_reverse_postorder(), ipa_write_summaries(), propagate(), propagate_nothrow(), and propagate_pure_const().
What state callgraph is in right now.
bool cpp_implicit_aliases_done |
Did procss_same_body_aliases run?
Referenced by analyze_functions(), cgraph_process_same_body_aliases(), cgraph_same_body_alias(), and varpool_extra_name_alias().
struct cgraph_2edge_hook_list* first_cgraph_edge_duplicated_hook |
List of hooks triggered when an edge is duplicated.
Referenced by cgraph_add_edge_duplication_hook(), cgraph_call_edge_duplication_hooks(), and cgraph_remove_edge_duplication_hook().
struct cgraph_edge_hook_list* first_cgraph_edge_removal_hook |
List of hooks triggered when an edge is removed.
Referenced by cgraph_add_edge_removal_hook(), cgraph_call_edge_removal_hooks(), and cgraph_remove_edge_removal_hook().
struct cgraph_node_hook_list* first_cgraph_function_insertion_hook |
List of hooks triggered when an function is inserted.
Referenced by cgraph_add_function_insertion_hook(), cgraph_call_function_insertion_hooks(), and cgraph_remove_function_insertion_hook().
struct cgraph_2node_hook_list* first_cgraph_node_duplicated_hook |
List of hooks triggered when a node is duplicated.
Referenced by cgraph_add_node_duplication_hook(), cgraph_call_node_duplication_hooks(), and cgraph_remove_node_duplication_hook().
struct cgraph_node_hook_list* first_cgraph_node_removal_hook |
List of hooks triggered when a node is removed.
Referenced by cgraph_add_node_removal_hook(), cgraph_call_node_removal_hooks(), and cgraph_remove_node_removal_hook().
|
static |
Head of a linked list of unused (freed) call graph edges. Do not this list so UIDs gets reliably recycled.
Referenced by cgraph_create_edge_1(), and cgraph_free_edge().
|
static |
Head of a linked list of unused (freed) call graph nodes. Do not this list so UIDs gets reliably recycled.
Referenced by cgraph_allocate_node(), and cgraph_remove_node().
|
static |
Mark as GC root all allocated nodes.
Referenced by insert_new_cgraph_node_version().
symtab_node x_cgraph_nodes_queue |
Queue of cgraph nodes scheduled to be lowered.