GCC Middle and Back End API Reference
|
#include <cgraph.h>
Public Member Functions | |
void | redirect_callee (cgraph_node *n) |
void | redirect_callee_duplicating_thunks (cgraph_node *n) |
cgraph_edge * | make_speculative (cgraph_node *n2, profile_count direct_count, unsigned int speculative_id=0) |
cgraph_edge * | first_speculative_call_target () |
cgraph_edge * | next_speculative_call_target () |
cgraph_edge * | speculative_call_indirect_edge () |
cgraph_edge * | speculative_call_for_target (cgraph_node *) |
ipa_ref * | speculative_call_target_ref () |
cgraph_edge * | clone (cgraph_node *n, gcall *call_stmt, unsigned stmt_uid, profile_count num, profile_count den, bool update_original) |
bool | verify_count () |
bool | cannot_lead_to_return_p (void) |
bool | recursive_p (void) |
bool | maybe_hot_p (void) |
int | get_uid () |
int | get_summary_id () |
bool | possibly_call_in_translation_unit_p (void) |
int | num_speculative_call_targets_p (void) |
bool | binds_to_current_def_p () |
int | frequency () |
sreal | sreal_frequency () |
Static Public Member Functions | |
static void | remove (cgraph_edge *edge) |
static cgraph_edge * | set_call_stmt (cgraph_edge *e, gcall *new_stmt, bool update_speculative=true) |
static cgraph_edge * | make_direct (cgraph_edge *edge, cgraph_node *callee) |
static cgraph_edge * | resolve_speculation (cgraph_edge *edge, tree callee_decl=NULL) |
static gimple * | redirect_call_stmt_to_callee (cgraph_edge *e, hash_set< tree > *killed_ssas=nullptr) |
static unsigned int | rebuild_edges (void) |
static void | rebuild_references (void) |
Data Fields | |
profile_count | count |
cgraph_node * | caller |
cgraph_node * | callee |
cgraph_edge * | prev_caller |
cgraph_edge * | next_caller |
cgraph_edge * | prev_callee |
cgraph_edge * | next_callee |
gcall * | call_stmt |
cgraph_indirect_call_info * | indirect_info |
void * | aux |
enum cgraph_inline_failed_t | inline_failed |
unsigned int | lto_stmt_uid |
unsigned int | speculative_id: 16 |
unsigned int | indirect_inlining_edge: 1 |
unsigned int | indirect_unknown_callee: 1 |
unsigned int | call_stmt_cannot_inline_p: 1 |
unsigned int | can_throw_external: 1 |
unsigned int | speculative: 1 |
unsigned | in_polymorphic_cdtor: 1 |
Private Member Functions | |
void | remove_caller (void) |
void | remove_callee (void) |
void | set_callee (cgraph_node *n) |
void | dump_edge_flags (FILE *f) |
void DEBUG_FUNCTION | debug (void) |
bool | verify_corresponds_to_fndecl (tree decl) |
Private Attributes | |
int | m_uid |
int | m_summary_id |
Friends | |
struct | cgraph_node |
class | symbol_table |
|
inline |
Return true if call must bind to current definition.
References symtab_node::binds_to_current_def_p(), callee, and caller.
bool cgraph_edge::cannot_lead_to_return_p | ( | void | ) |
Return true when call of edge cannot 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 the exit block or throw to get better results.
References callee, caller, cgraph_node::cannot_return_p(), symtab_node::decl, cgraph_indirect_call_info::ecf_flags, ECF_NORETURN, ECF_NOTHROW, indirect_info, indirect_unknown_callee, and opt_for_fn.
Referenced by get_read_write_all_from_node(), propagate_bits(), and propagate_pure_const().
cgraph_edge * cgraph_edge::clone | ( | cgraph_node * | n, |
gcall * | call_stmt, | ||
unsigned | stmt_uid, | ||
profile_count | num, | ||
profile_count | den, | ||
bool | update_original ) |
Callgraph clones Copyright (C) 2003-2024 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 module provide facilities for cloning functions. I.e. creating new functions based on existing functions with simple modifications, such as replacement of parameters. To allow whole program optimization without actual presence of function bodies, an additional infrastructure is provided for so-called virtual clones A virtual clone in the callgraph is a function that has no associated body, just a description of how to create its body based on a different function (which itself may be a virtual clone). The description of function modifications includes adjustments to the function's signature (which allows, for example, removing or adding function arguments), substitutions to perform on the function body, and, for inlined functions, a pointer to the function that it will be inlined into. It is also possible to redirect any edge of the callgraph from a function to its virtual clone. This implies updating of the call site to adjust for the new function signature. Most of the transformations performed by inter-procedural optimizations can be represented via virtual clones. For instance, a constant propagation pass can produce a virtual clone of the function which replaces one of its arguments by a constant. The inliner can represent its decisions by producing a clone of a function whose body will be later integrated into a given function. Using virtual clones, the program can be easily updated during the Execute stage, solving most of pass interactions problems that would otherwise occur during Transform. Virtual clones are later materialized in the LTRANS stage and turned into real functions. Passes executed after the virtual clone were introduced also perform their Transform stage on new functions, so for a pass there is no significant difference between operating on a real function or a virtual clone introduced before its Execute stage. Optimization passes then work on virtual clones introduced before their Execute stage as if they were real functions. The only difference is that clones are not visible during the Generate Summary stage.
Create clone of edge in the node N represented by CALL_EXPR the callgraph.
References profile_count::adjust_for_ipa_scaling(), profile_count::apply_scale(), symbol_table::call_edge_duplication_hooks(), call_stmt, call_stmt_cannot_inline_p, callee, caller, can_throw_external, profile_count::combine_with_ipa_count_within(), count, cgraph_node::count, cgraph_node::create_edge(), cgraph_node::create_indirect_edge(), cgraph_indirect_call_info::ecf_flags, gcc_checking_assert, cgraph_node::get(), ggc_cleared_alloc(), gimple_call_fndecl(), in_polymorphic_cdtor, indirect_info, indirect_inlining_edge, indirect_unknown_callee, inline_failed, profile_count::ipa(), lto_stmt_uid, speculative, speculative_id, and symtab.
Referenced by copy_bb(), cgraph_node::create_clone(), and cgraph_node::create_version_clone().
|
private |
Dump edge to stderr.
References callee, caller, cgraph_node::debug(), symtab_node::dump_asm_name(), dump_edge_flags(), and NULL.
|
private |
Output flags of edge to a file F.
References call_stmt_cannot_inline_p, can_throw_external, count, profile_count::dump(), indirect_inlining_edge, profile_count::initialized_p(), inline_failed, speculative, and sreal_frequency().
Referenced by debug().
cgraph_edge * cgraph_edge::first_speculative_call_target | ( | ) |
Speculative call consists of an indirect edge and one or more direct edge+ref pairs. Given an edge which is part of speculative call, return the first direct call edge in the speculative call sequence.
References call_stmt, callee, cgraph_node::callees, caller, gcc_checking_assert, cgraph_node::get_edge(), lto_stmt_uid, next_callee, prev_callee, and speculative.
Referenced by ipa_merge_profiles(), make_direct(), redirect_call_stmt_to_callee(), resolve_speculation(), set_call_stmt(), speculative_call_for_target(), and update_indirect_edges_after_inlining().
|
inline |
Expected frequency of executions within the function. When set to CGRAPH_FREQ_BASE, the edge is expected to be called once per function call. The range is 0 to CGRAPH_FREQ_MAX.
References caller, count, cgraph_node::count, cgraph_node::inlined_to, and profile_count::to_cgraph_frequency().
|
inline |
References m_summary_id.
|
inline |
References m_uid.
|
static |
Make an indirect or speculative EDGE with an unknown callee an ordinary edge leading to CALLEE. Speculations can be resolved in the process and EDGE can be removed and deallocated. Return the edge that now represents the call.
References callee, symtab_node::decl, first_speculative_call_target(), gcc_assert, gcc_checking_assert, ggc_free(), initialize_inline_failed(), next_speculative_call_target(), NULL, ipa_ref::referred, resolve_speculation(), symtab_node::semantically_equivalent_p(), speculative, speculative_call_indirect_edge(), and speculative_call_target_ref().
Referenced by ipa_make_edge_direct_to_target(), redirect_call_stmt_to_callee(), redirect_to_unreachable(), set_call_stmt(), walk_polymorphic_call_targets(), and walk_polymorphic_call_targets().
cgraph_edge * cgraph_edge::make_speculative | ( | cgraph_node * | n2, |
profile_count | direct_count, | ||
unsigned int | speculative_id = 0 ) |
Turn edge 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 reference representing the if conditional and attaches them all to the original indirect call statement. speculative_id is used to link direct calls with their corresponding IPA_REF_ADDR references when representing speculative calls. Return direct edge created.
References symbol_table::call_edge_duplication_hooks(), call_stmt, caller, can_throw_external, count, cgraph_node::create_edge(), symtab_node::create_reference(), symtab_node::decl, dump_file, symtab_node::dump_name(), in_polymorphic_cdtor, indirect_info, initialize_inline_failed(), IPA_REF_ADDR, lto_stmt_uid, ipa_ref::lto_stmt_uid, cgraph_node::mark_address_taken(), NULL, cgraph_indirect_call_info::num_speculative_call_targets, speculative, ipa_ref::speculative, speculative_id, ipa_ref::speculative_id, symtab, and TREE_NOTHROW.
Referenced by autofdo::afdo_indirect_call(), ipa_devirt(), ipa_make_edge_direct_to_target(), ipa_merge_profiles(), and ipa_profile().
bool cgraph_edge::maybe_hot_p | ( | void | ) |
Return true if the edge may be considered hot.
References callee, caller, count, cgraph_node::count, symtab_node::decl, cgraph_node::frequency, profile_count::initialized_p(), cgraph_node::inlined_to, profile_count::ipa(), maybe_hot_count_p(), NODE_FREQUENCY_EXECUTED_ONCE, NODE_FREQUENCY_HOT, NODE_FREQUENCY_UNLIKELY_EXECUTED, NULL, and opt_for_fn.
Referenced by check_callers(), contains_hot_call_p(), estimate_edge_size_and_time(), gather_caller_stats(), get_info_about_necessary_edges(), ipa_devirt(), ipa_get_indirect_edge_target_1(), ipa_profile(), value_topo_info< valtype >::propagate_effects(), speculation_useful_p(), try_make_edge_direct_virtual_call(), want_early_inline_function_p(), and want_inline_small_function_p().
|
inline |
References call_stmt, callee, gcc_checking_assert, lto_stmt_uid, next_callee, NULL, and speculative.
Referenced by analyze_function_body(), copy_bb(), ipa_merge_profiles(), make_direct(), redirect_call_stmt_to_callee(), set_call_stmt(), speculative_call_for_target(), and update_indirect_edges_after_inlining().
int cgraph_edge::num_speculative_call_targets_p | ( | void | ) |
Return num_speculative_targets of this edge.
References indirect_info, and cgraph_indirect_call_info::num_speculative_call_targets.
Referenced by copy_bb(), redirect_call_stmt_to_callee(), set_call_stmt(), update_call_stmt_hash_for_removing_direct_edge(), and verify_speculative_call().
bool cgraph_edge::possibly_call_in_translation_unit_p | ( | void | ) |
During LTO stream in this can be used to check whether call can possibly be internal to the current translation unit.
References AVAIL_INTERPOSABLE, callee, caller, symtab_node::decl, DECL_ASSEMBLER_NAME, DECL_EXTERNAL, gcc_assert, gcc_checking_assert, symtab_node::get_availability(), symtab_node::get_for_asmname(), INCREMENTAL_LINK_LTO, symtab_node::prevailing_p(), symtab_node::previous_sharing_asm_name, and TREE_PUBLIC.
Referenced by ipa_read_edge_info(), and read_ipa_call_summary().
|
static |
Rebuild cgraph edges for current function node. This needs to be run after passes that don't update the cgraph.
References call_stmt, cfun, basic_block_def::count, cgraph_node::count, cgraph_node::create_edge(), cgraph_node::create_indirect_edge(), current_function_decl, dyn_cast(), ENTRY_BLOCK_PTR_FOR_FN, FOR_EACH_BB_FN, gcc_assert, cgraph_node::get(), cgraph_node::get_create(), gimple_call_flags(), gimple_call_fndecl(), gimple_call_internal_p(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), cgraph_node::inlined_to, record_eh_tables(), cgraph_node::record_stmt_references(), symtab_node::remove_all_references(), and cgraph_node::remove_callees().
Referenced by autofdo::auto_profile(), execute_function_todo(), expand_omp_target(), expand_omp_taskreg(), cgraph_node::get_body(), split_function(), and tree_profiling().
|
static |
Rebuild cgraph references for current function node. This needs to be run after passes that don't update the cgraph.
References cfun, current_function_decl, FOR_EACH_BB_FN, cgraph_node::get(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), i, symtab_node::iterate_reference(), NULL, record_eh_tables(), cgraph_node::record_stmt_references(), ipa_ref::remove_reference(), and ipa_ref::speculative.
Referenced by tree_function_versioning().
|
inline |
Return true when the edge represents a direct recursion.
References callee, caller, symtab_node::decl, cgraph_node::inlined_to, and cgraph_node::ultimate_alias_target().
Referenced by check_callers(), do_estimate_growth_1(), early_inline_small_functions(), expand_call_inline(), flatten_function(), inline_always_inline_functions(), inline_to_all_callers_1(), and propagate_pure_const().
|
static |
If necessary, change the function declaration in the call statement associated with E so that it corresponds to the edge callee. Speculations can be resolved in the process and EDGE can be removed and deallocated. The edge could be one of speculative direct call generated from speculative indirect call. In this circumstance, decrease the speculative targets count (i.e. num_speculative_call_targets) and redirect call stmt to the corresponding i-th target. If no speculative direct call left to the speculative indirect call, remove "speculative" of the indirect call and also redirect stmt to it's final direct target. When called from within tree-inline, KILLED_SSAs has to contain the pointer to killed_new_ssa_names within the copy_body_data structure and SSAs discovered to be useless (if LHS is removed) will be added to it, otherwise it needs to be NULL. It is up to caller to iteratively transform each "speculative" direct call as appropriate.
References add_stmt_to_eh_lp(), call_stmt, callee, caller, cgraph_node::clone_of, basic_block_def::count, count, create_tmp_reg_fn(), symtab_node::decl, DECL_STATIC_CHAIN, DECL_STRUCT_FUNCTION, ipa_param_adjustments::dump(), profile_count::dump(), dump_file, symbol_table::dump_file, dump_flags, symtab_node::dump_name(), dyn_cast(), profile_probability::even(), first_speculative_call_target(), fndecl_built_in_p(), cgraph_node::former_clone_of, gcc_assert, gcc_checking_assert, cgraph_node::get(), clone_info::get(), gimple_bb(), gimple_build_nop(), gimple_call_chain(), gimple_call_fndecl(), gimple_call_fntype(), gimple_call_lhs(), gimple_call_noreturn_p(), gimple_call_set_chain(), gimple_call_set_fndecl(), gimple_call_set_fntype(), gimple_call_set_lhs(), gimple_ic(), indirect_info, indirect_unknown_callee, profile_probability::initialized_p(), ipa_saved_clone_sources, ipa_verify_edge_has_no_modifications(), lookup_stmt_eh_lp(), make_direct(), maybe_remove_unused_call_args(), next_speculative_call_target(), NULL, NULL_TREE, cgraph_indirect_call_info::num_speculative_call_targets, num_speculative_call_targets_p(), clone_info::param_adjustments, pop_cfun(), print_gimple_stmt(), profile_count::probability_in(), push_cfun(), ipa_ref::referred, remove_stmt_from_eh_lp(), set_call_stmt(), cgraph_node::set_call_stmt_including_clones(), set_ssa_default_def(), SET_SSA_NAME_VAR_OR_IDENTIFIER, should_remove_lhs_p(), speculative, ipa_ref::speculative, speculative_call_indirect_edge(), speculative_call_target_ref(), SSA_NAME_DEF_STMT, ipa_ref::stmt, symtab, TREE_CODE, TREE_TYPE, TREE_VALUE, TYPE_ARG_TYPES, update_call_stmt_hash_for_removing_direct_edge(), update_stmt_fn(), void_type_node, and VOID_TYPE_P.
Referenced by autofdo::afdo_indirect_call(), create_dispatcher_calls(), function_and_variable_visibility(), inline_transform(), redirect_all_calls(), redirect_to_specific_clone(), walk_polymorphic_call_targets(), and walk_polymorphic_call_targets().
void cgraph_edge::redirect_callee | ( | cgraph_node * | n | ) |
Redirect callee of the edge to N. The function does not update underlying call expression.
References callee, caller, cgraph_node::calls_comdat_local, cgraph_node::check_calls_comdat_local_p(), symtab_node::comdat_local_p(), gcc_checking_assert, inline_failed, cgraph_node::inlined_to, remove_callee(), and set_callee().
Referenced by clone_inlined_nodes(), create_dispatcher_calls(), cgraph_node::create_version_clone(), function_and_variable_visibility(), inline_call(), ipa_merge_profiles(), ipa_tm_transform_calls_redirect(), recursive_inlining(), ipa_icf::redirect_all_callers(), redirect_callee_duplicating_thunks(), and redirect_to_unreachable().
void cgraph_edge::redirect_callee_duplicating_thunks | ( | cgraph_node * | n | ) |
If E does not lead to a thunk, simply redirect it to N. Otherwise create one or more equivalent thunks for N and redirect E to the first in the chain. Note that it is then necessary to call n->expand_all_artificial_thunks once all callers are redirected.
References callee, duplicate_thunk_for_node(), redirect_callee(), cgraph_node::thunk, and cgraph_node::ultimate_alias_target().
Referenced by cgraph_node::create_clone(), create_specialized_node(), and perhaps_add_new_callers().
|
static |
Remove the edge in the cgraph.
References symbol_table::call_edge_removal_hooks(), symbol_table::free_edge(), and symtab.
Referenced by cgraph_update_edges_for_call_stmt_node(), delete_unreachable_blocks_update_callgraph(), expand_call_inline(), cgraph_node::remove_symbol_and_inline_clones(), and resolve_speculation().
|
inlineprivate |
Remove the edge from the list of the callers of the callee.
References callee, cgraph_node::callers, gcc_assert, indirect_unknown_callee, next_caller, and prev_caller.
Referenced by redirect_callee(), and cgraph_node::remove_callees().
|
private |
Remove the edge from the list of the callees of the caller.
References cgraph_node::call_site_hash, call_stmt, cgraph_node::callees, caller, cgraph_node::get_edge(), cgraph_edge_hasher::hash(), cgraph_node::indirect_calls, indirect_unknown_callee, next_callee, prev_callee, and hash_table< Descriptor, Lazy, Allocator >::remove_elt_with_hash().
Referenced by cgraph_node::remove_callers().
|
static |
Speculative call EDGE turned out to be direct call to CALLEE_DECL. Remove the speculative call sequence and return edge representing the call, the original EDGE can be removed and deallocated. Return the edge that now represents the call. For "speculative" indirect call that contains multiple "speculative" targets (i.e. edge->indirect_info->num_speculative_call_targets > 1), decrease the count and only remove current direct edge. If no speculative direct call left to the speculative indirect call, remove the speculative of both the indirect call and corresponding direct edge. It is up to caller to iteratively resolve each "speculative" direct call and redirect the call as appropriate.
References callee, count, dump_file, symtab_node::dump_name(), first_speculative_call_target(), gcc_assert, symtab_node::get(), indirect_unknown_callee, inline_failed, print_generic_expr(), ipa_ref::referred, remove(), ipa_ref::remove_reference(), cgraph_node::remove_symbol_and_inline_clones(), symtab_node::semantically_equivalent_p(), speculative, speculative_call_target_ref(), and update_call_stmt_hash_for_removing_direct_edge().
Referenced by check_speculations_1(), inline_small_functions(), ipa_inline(), ipa_merge_profiles(), make_direct(), redirect_to_unreachable(), and resolve_noninline_speculation().
|
static |
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. Speculations can be resolved in the process and EDGE can be removed and deallocated. Return the edge that now represents the call.
References cgraph_node::call_site_hash, call_stmt, callee, caller, can_throw_external, cgraph_add_edge_to_call_site_hash(), d2, symtab_node::decl, DECL_STRUCT_FUNCTION, first_speculative_call_target(), gcc_assert, gcc_checking_assert, cgraph_node::get(), cgraph_node::get_edge(), gimple_call_fndecl(), cgraph_edge_hasher::hash(), i, indirect_unknown_callee, symtab_node::iterate_reference(), make_direct(), next_speculative_call_target(), NULL, num_speculative_call_targets_p(), prev_callee, hash_table< Descriptor, Lazy, Allocator >::remove_elt_with_hash(), set_call_stmt(), speculative, ipa_ref::speculative, speculative_call_indirect_edge(), ipa_ref::stmt, and stmt_can_throw_external().
Referenced by cgraph_update_edges_for_call_stmt_node(), copy_bb(), cgraph_node::create_edge_including_clones(), redirect_call_stmt_to_callee(), set_call_stmt(), and cgraph_node::set_call_stmt_including_clones().
|
inlineprivate |
Set callee N of call graph edge and add it to the corresponding set of callers.
References callee, cgraph_node::callers, next_caller, NULL, and prev_caller.
Referenced by redirect_callee().
cgraph_edge * cgraph_edge::speculative_call_for_target | ( | cgraph_node * | target | ) |
Return edge corresponding to speculative call to a given target. NULL if speculative call does not have one.
References first_speculative_call_target(), next_speculative_call_target(), and NULL.
Referenced by ipa_devirt(), ipa_make_edge_direct_to_target(), and ipa_merge_profiles().
|
inline |
References call_stmt, callee, caller, gcc_checking_assert, cgraph_node::indirect_calls, lto_stmt_uid, next_callee, and speculative.
Referenced by analyze_function_body(), copy_bb(), make_direct(), redirect_call_stmt_to_callee(), set_call_stmt(), cgraph_node::set_call_stmt_including_clones(), and speculation_useful_p().
|
inline |
References call_stmt, caller, gcc_checking_assert, gcc_unreachable, i, symtab_node::iterate_reference(), lto_stmt_uid, ipa_ref::lto_stmt_uid, speculative, ipa_ref::speculative, speculative_id, ipa_ref::speculative_id, and ipa_ref::stmt.
Referenced by make_direct(), redirect_call_stmt_to_callee(), and resolve_speculation().
sreal cgraph_edge::sreal_frequency | ( | ) |
Expected frequency of executions within the function.
References caller, count, cgraph_node::count, cgraph_node::inlined_to, and profile_count::to_sreal_scale().
Referenced by big_speedup_p(), dump_edge_flags(), dump_inline_stats(), estimate_edge_size_and_time(), expand_call_inline(), gather_caller_stats(), get_info_about_necessary_edges(), lookup_recursive_calls(), ipcp_lattice< valtype >::print(), value_topo_info< valtype >::propagate_effects(), propagate_vals_across_arith_jfunc(), and want_inline_self_recursive_call_p().
Verify that call graph edge corresponds to DECL from the associated statement. Return true if the verification should fail.
References symtab_node::body_removed, callee, clone_of_p(), symtab_node::decl, fndecl_built_in_p(), cgraph_node::former_clone_of, cgraph_node::get(), cgraph_node::icf_merged, symtab_node::in_other_partition, cgraph_node::inlined_to, LTO_STREAMING, symbol_table::state, symtab, and cgraph_node::ultimate_alias_target().
Referenced by cgraph_node::verify_node().
bool cgraph_edge::verify_count | ( | ) |
Verify edge count and frequency.
References count, error(), error_found, and profile_count::verify().
Referenced by cgraph_node::verify_node().
|
friend |
|
friend |
void* cgraph_edge::aux |
Referenced by heap_edge_removal_hook(), update_callee_keys(), and cgraph_node::verify_node().
gcall* cgraph_edge::call_stmt |
Referenced by adjust_references_in_caller(), cgraph_add_edge_to_call_site_hash(), cgraph_update_edge_in_call_site_hash(), clone(), copy_bb(), cgraph_node::create_clone(), cgraph_node::create_version_clone(), drop_profile(), ipa_edge_args_sum_t::duplicate(), early_inline_small_functions(), cgraph_edge_hasher::equal(), evaluate_properties_for_edge(), expand_call_inline(), expand_thunk(), first_speculative_call_target(), fixup_call_stmt_edges_1(), flatten_function(), cgraph_node::get_edge(), cgraph_edge_hasher::hash(), inline_always_inline_functions(), ipa_compute_jump_functions_for_bb(), ipa_compute_jump_functions_for_edge(), ipa_devirt(), ipa_get_callee_param_type(), ipa_make_edge_direct_to_target(), ipa_merge_profiles(), ipa_print_node_jump_functions(), ipa_tm_diagnose_tm_safe(), ipa_tm_note_irrevocable(), make_speculative(), ipa_param_adjustments::modify_call(), next_speculative_call_target(), rebuild_edges(), redirect_call_stmt_to_callee(), remove_caller(), remove_described_reference(), report_inline_failed_reason(), set_call_stmt(), speculative_call_indirect_edge(), speculative_call_target_ref(), tree_function_versioning(), update_call_expr(), update_call_stmt_hash_for_removing_direct_edge(), cgraph_node::verify_node(), verify_speculative_call(), and want_early_inline_function_p().
unsigned int cgraph_edge::call_stmt_cannot_inline_p |
Referenced by can_inline_edge_p(), clone(), dump_edge_flags(), evaluate_properties_for_edge(), and initialize_inline_failed().
cgraph_node* cgraph_edge::callee |
Referenced by ipcp_lattice< valtype >::add_value(), binds_to_current_def_p(), ipa_icf::sem_item_optimizer::build_graph(), call_passes_through_thunk(), caller_growth_limits(), calls_same_node_or_its_all_contexts_clone_p(), can_early_inline_edge_p(), can_inline_edge_by_limits_p(), can_inline_edge_p(), cannot_lead_to_return_p(), cgraph_add_edge_to_call_site_hash(), cgraph_update_edges_for_call_stmt_node(), clone(), clone_inlined_nodes(), clone_of_p(), ipa_icf::sem_function::compare_polymorphic_p(), compute_fn_summary(), compute_ltrans_boundary(), contains_hot_call_p(), cgraph_node::create_clone(), debug(), delete_unreachable_blocks_update_callgraph(), dump_inline_stats(), duplicate_thunk_for_node(), early_inline_small_functions(), edge_set_predicate(), ipa_icf::sem_function::equals_wpa(), estimate_calls_size_and_time_1(), estimate_edge_size_and_time(), evaluate_properties_for_edge(), expand_call_inline(), expand_thunk(), first_speculative_call_target(), flatten_function(), function_and_variable_visibility(), cgraph_node::function_or_virtual_thunk_symbol(), cgraph_node::function_symbol(), get_read_write_all_from_node(), handle_missing_profiles(), ignore_edge_for_nothrow(), ignore_edge_for_pure_const(), ignore_edge_p(), ignore_edge_p(), ignore_edge_p(), initialize_inline_failed(), inline_always_inline_functions(), inline_call(), inline_update_callee_summaries(), ipa_compute_jump_functions_for_bb(), ipa_edge_within_scc(), ipa_get_callee_param_type(), ipa_make_edge_direct_to_target(), ipa_print_node_jump_functions(), ipa_profile(), ipa_propagate_indirect_call_infos(), ipa_read_edge_info(), ipa_tm_diagnose_tm_safe(), ipa_tm_transform_calls_redirect(), ipcp_discover_new_direct_edges(), cgraph_node::local_p(), lookup_recursive_calls(), make_direct(), maybe_hot_p(), merge_aggregate_lattices(), ipa_param_adjustments::modify_call(), next_speculative_call_target(), num_calls(), possibly_call_in_translation_unit_p(), propagate_aggs_across_jump_function(), propagate_bits(), propagate_bits_across_jump_function(), propagate_constants_across_call(), propagate_constants_topo(), propagate_controlled_uses(), value_topo_info< valtype >::propagate_effects(), propagate_info_to_inlined_callees(), propagate_nothrow(), propagate_pure_const(), read_ipa_call_summary(), recursive_inlining(), recursive_p(), redirect_call_stmt_to_callee(), redirect_callee(), redirect_callee_duplicating_thunks(), redirect_to_unreachable(), remap_edge_summaries(), remove_callee(), cgraph_node::remove_symbol_and_inline_clones(), symbol_table::remove_unreachable_nodes(), report_inline_failed_reason(), reset_edge_caches(), resolve_speculation(), self_recursive_agg_pass_through_p(), self_recursive_p(), self_recursive_pass_through_p(), set_call_stmt(), set_callee(), speculation_useful_p(), speculative_call_indirect_edge(), spread_undeadness(), summarize_calls_size_and_time(), try_make_edge_direct_simple_call(), update_callee_keys(), update_indirect_edges_after_inlining(), update_inlined_to_pointer(), update_noncloned_counts(), verify_corresponds_to_fndecl(), cgraph_node::verify_node(), want_early_inline_function_p(), and want_inline_small_function_p().
cgraph_node* cgraph_edge::caller |
Referenced by adjust_callers_for_value_intersection(), adjust_clone_incoming_counts(), adjust_references_in_caller(), cgraph_node::assemble_thunks_and_aliases(), big_speedup_p(), binds_to_current_def_p(), cgraph_node::call_for_symbol_thunks_and_aliases(), caller_growth_limits(), calls_same_node_or_its_all_contexts_clone_p(), can_early_inline_edge_p(), can_inline_edge_by_limits_p(), can_inline_edge_p(), cannot_lead_to_return_p(), cgraph_add_edge_to_call_site_hash(), cgraph_edge_brings_all_scalars_for_node(), cgraph_edge_brings_value_p(), cgraph_edge_brings_value_p(), cgraph_update_edge_in_call_site_hash(), check_callers(), clone(), clone_inlined_nodes(), collect_callers_of_node_1(), create_specialized_node(), debug(), decide_whether_version_node(), do_estimate_growth_1(), ipa_edge_args_sum_t::duplicate(), duplicate_thunk_for_node(), early_inline_small_functions(), estimate_edge_devirt_benefit(), evaluate_properties_for_edge(), cgraph_node::expand_all_artificial_thunks(), expand_call_inline(), find_more_contexts_for_caller_subset(), find_more_scalar_values_for_callers_subset(), first_speculative_call_target(), flatten_function(), frequency(), function_and_variable_visibility(), function_called_by_processed_nodes_p(), gather_caller_stats(), get_info_about_necessary_edges(), handle_missing_profiles(), has_undead_caller_from_outside_scc_p(), ignore_edge_for_nothrow(), ignore_edge_for_pure_const(), ignore_edge_p(), ignore_edge_p(), ignore_edge_p(), inline_always_inline_functions(), inline_call(), inline_small_functions(), inline_to_all_callers_1(), ipa_compute_jump_functions_for_edge(), ipa_edge_within_scc(), ipa_get_indirect_edge_target_1(), ipa_get_stack_frame_offset(), ipa_impossible_devirt_target(), ipa_make_edge_direct_to_target(), ipa_merge_modref_summary_after_inlining(), ipa_tm_execute(), ipa_tm_note_irrevocable(), ipa_tm_transform_calls_redirect(), ipa_value_range_from_jfunc(), lookup_recursive_calls(), make_speculative(), maybe_hot_p(), perhaps_add_new_callers(), possibly_call_in_translation_unit_p(), ipcp_lattice< valtype >::print(), propagate_aggregate_lattice(), propagate_aggs_across_jump_function(), propagate_bits_across_jump_function(), propagate_constants_across_call(), propagate_context_across_jump_function(), propagate_controlled_uses(), value_topo_info< valtype >::propagate_effects(), propagate_nothrow(), propagate_pure_const(), propagate_scalar_across_jump_function(), propagate_vals_across_arith_jfunc(), propagate_vr_across_jump_function(), push_agg_values_for_index_from_edge(), reachable_from_other_partition_p(), reachable_from_this_partition_p(), recursive_inlining(), recursive_p(), ipa_icf::redirect_all_callers(), redirect_call_stmt_to_callee(), redirect_callee(), remove_caller(), remove_described_reference(), report_inline_failed_reason(), reset_edge_caches(), self_recursive_agg_pass_through_p(), self_recursive_pass_through_p(), set_call_stmt(), set_nothrow_flag_1(), set_single_call_flag(), speculation_useful_p(), speculative_call_indirect_edge(), speculative_call_target_ref(), sreal_frequency(), try_make_edge_direct_virtual_call(), update_call_expr(), update_call_stmt_hash_for_removing_direct_edge(), update_callee_keys(), update_indirect_edges_after_inlining(), cgraph_node::verify_node(), want_early_inline_function_p(), and want_inline_small_function_p().
unsigned int cgraph_edge::can_throw_external |
profile_count cgraph_edge::count |
Referenced by cgraph_update_edges_for_call_stmt_node(), clone(), clone_inlined_nodes(), copy_bb(), drop_profile(), dump_edge_flags(), dump_inline_stats(), expand_call_inline(), frequency(), gather_caller_stats(), get_info_about_necessary_edges(), handle_missing_profiles(), ipa_devirt(), ipa_make_edge_direct_to_target(), ipa_merge_profiles(), ipa_profile(), make_speculative(), maybe_hot_p(), perhaps_add_new_callers(), read_thunk_profile(), recursive_inlining(), redirect_call_stmt_to_callee(), redirect_to_unreachable(), resolve_speculation(), scale_ipa_profile_for_fn(), sreal_frequency(), tree_function_versioning(), update_call_edge_frequencies(), update_noncloned_counts(), update_specialized_profile(), verify_count(), cgraph_node::verify_node(), and want_inline_small_function_p().
unsigned cgraph_edge::in_polymorphic_cdtor |
cgraph_indirect_call_info* cgraph_edge::indirect_info |
Referenced by cannot_lead_to_return_p(), clone(), ipa_icf::sem_function::compare_edge_flags(), dump_inline_stats(), dump_possible_polymorphic_call_targets(), symbol_table::free_edge(), get_read_write_all_from_node(), initialize_node_lattices(), ipa_analyze_call_uses(), ipa_analyze_indirect_call_uses(), ipa_analyze_virtual_call_uses(), ipa_devirt(), ipa_get_indirect_edge_target_1(), ipa_make_edge_direct_to_target(), ipa_note_param_call(), ipa_polymorphic_call_context::ipa_polymorphic_call_context(), ipa_print_node_jump_functions(), ipa_profile(), ipa_read_indirect_edge_info(), ipa_tm_insert_gettmclone_call(), ipa_write_indirect_edge_info(), ipcp_discover_new_direct_edges(), make_speculative(), num_speculative_call_targets_p(), possible_polymorphic_call_target_p(), possible_polymorphic_call_targets(), propagate_nothrow(), propagate_pure_const(), redirect_call_stmt_to_callee(), symbol_table::remove_unreachable_nodes(), speculation_useful_p(), try_make_edge_direct_simple_call(), try_make_edge_direct_virtual_call(), update_indirect_edges_after_inlining(), and cgraph_node::verify_node().
unsigned int cgraph_edge::indirect_inlining_edge |
unsigned int cgraph_edge::indirect_unknown_callee |
Referenced by cannot_lead_to_return_p(), cgraph_add_edge_to_call_site_hash(), cgraph_update_edges_for_call_stmt_node(), clone(), ipa_call_summary_t::duplicate(), expand_call_inline(), initialize_inline_failed(), ipa_analyze_call_uses(), ipa_profile_generate_summary(), redirect_call_stmt_to_callee(), remove_callee(), cgraph_node::remove_callees(), remove_caller(), resolve_speculation(), set_call_stmt(), speculation_useful_p(), and cgraph_node::verify_node().
enum cgraph_inline_failed_t cgraph_edge::inline_failed |
Referenced by caller_growth_limits(), can_early_inline_edge_p(), can_inline_edge_by_limits_p(), can_inline_edge_p(), cgraph_update_edges_for_call_stmt_node(), clone(), clone_inlined_nodes(), compute_fn_summary(), contains_hot_call_p(), cgraph_node::create_edge_including_clones(), delete_unreachable_blocks_update_callgraph(), do_estimate_growth_1(), dump_edge_flags(), dump_inline_stats(), early_inline_small_functions(), estimate_calls_size_and_time(), estimate_calls_size_and_time_1(), expand_call_inline(), flatten_function(), growth_positive_p(), initialize_inline_failed(), inline_always_inline_functions(), inline_analyze_function(), inline_call(), inline_transform(), inline_update_callee_summaries(), input_edge(), lookup_recursive_calls(), optimize_inline_calls(), propagate_info_to_inlined_callees(), recursive_inlining(), redirect_callee(), redirect_to_unreachable(), remap_edge_summaries(), cgraph_node::remove_symbol_and_inline_clones(), symbol_table::remove_unreachable_nodes(), report_inline_failed_reason(), reset_edge_caches(), resolve_speculation(), speculation_useful_p(), summarize_calls_size_and_time(), update_callee_keys(), update_noncloned_counts(), cgraph_node::verify_node(), want_early_inline_function_p(), and want_inline_small_function_p().
unsigned int cgraph_edge::lto_stmt_uid |
Referenced by adjust_references_in_caller(), clone(), cgraph_node::create_clone(), cgraph_node::create_version_clone(), ipa_edge_args_sum_t::duplicate(), first_speculative_call_target(), fixup_call_stmt_edges_1(), ipa_make_edge_direct_to_target(), make_speculative(), next_speculative_call_target(), remove_described_reference(), speculative_call_indirect_edge(), speculative_call_target_ref(), cgraph_node::verify_node(), and verify_speculative_call().
|
private |
Referenced by symbol_table::free_edge(), and get_summary_id().
|
private |
Referenced by get_uid().
cgraph_edge* cgraph_edge::next_callee |
Referenced by analyze_functions(), ipa_icf::sem_item_optimizer::build_graph(), calls_builtin_apply_args_p(), calls_builtin_va_start_p(), can_early_inline_edge_p(), can_strub_internally_p(), cgraph_node::check_calls_comdat_local_p(), clone_inlined_nodes(), clone_of_p(), ipa_icf::sem_function::compare_polymorphic_p(), compute_fn_summary(), compute_ltrans_boundary(), contains_hot_call_p(), cgraph_node::create_clone(), cgraph_node::create_version_clone(), determine_versionability(), devirtualization_time_bonus(), drop_profile(), dump_inline_stats(), dump_ipa_call_summary(), dump_modref_edge_summaries(), dump_profile_updates(), ipa_fn_summary_t::duplicate(), early_inline_small_functions(), early_inliner(), ipa_icf::sem_function::equals_wpa(), estimate_calls_size_and_time(), estimate_calls_size_and_time_1(), first_speculative_call_target(), fixup_call_stmt_edges_1(), flatten_function(), function_and_variable_visibility(), cgraph_node::get_edge(), get_read_write_all_from_node(), initialize_node_lattices(), inline_always_inline_functions(), inline_analyze_function(), inline_call(), inline_read_section(), inline_small_functions(), inline_transform(), inline_update_callee_summaries(), input_node_opt_summary(), ipa_analyze_node(), ipa_devirt(), ipa_fn_summary_write(), ipa_inline(), ipa_merge_profiles(), ipa_print_node_jump_functions(), ipa_profile(), ipa_profile_dump_all_summaries(), ipa_profile_read_summary_section(), ipa_profile_write_summary(), ipa_read_node_info(), ipa_tm_diagnose_tm_safe(), ipa_write_node_info(), ipcp_discover_new_direct_edges(), ipcp_propagate_stage(), localize_profile(), lookup_recursive_calls(), mark_all_inlined_calls_cdtor(), maybe_materialize_called_clones(), merge_profile_summaries(), next_speculative_call_target(), num_calls(), optimize_inline_calls(), output_node_opt_summary(), propagate_bits(), propagate_constants_topo(), propagate_info_to_inlined_callees(), propagate_malloc(), propagate_nothrow(), propagate_pure_const(), recursive_inlining(), ipa_icf::redirect_all_callers(), redirect_to_specific_clone(), remap_edge_summaries(), cgraph_node::remove_callees(), ipa_fn_summary_t::remove_callees(), remove_caller(), remove_modref_edge_summaries(), cgraph_node::remove_symbol_and_inline_clones(), symbol_table::remove_unreachable_nodes(), reset_edge_caches(), scale_ipa_profile_for_fn(), searchc(), self_recursive_p(), speculative_call_indirect_edge(), spread_undeadness(), summarize_calls_size_and_time(), ipa_icf::symbol_compare_collection::symbol_compare_collection(), tree_function_versioning(), update_call_stmt_hash_for_removing_direct_edge(), update_callee_keys(), update_counts_for_self_gen_clones(), update_indirect_edges_after_inlining(), update_inlined_to_pointer(), update_noncloned_counts(), update_profiling_info(), update_specialized_profile(), cgraph_node::verify_node(), verify_speculative_call(), and verify_strub().
cgraph_edge* cgraph_edge::next_caller |
Referenced by add_detected_attribute_1(), symtab_node::add_to_same_comdat_group(), adjust_clone_incoming_counts(), adjust_refs_in_act_callers(), analyze_clone_icoming_counts(), cgraph_node::assemble_thunks_and_aliases(), cgraph_node::call_for_symbol_thunks_and_aliases(), called_directly_with_type_override_p(), check_callers(), check_callers(), clone_inlined_nodes(), collect_callers_of_node_1(), count_callers(), create_dispatcher_calls(), distinctify_node_type(), do_estimate_growth_1(), duplicate_thunk_for_node(), execute_split_functions(), cgraph_node::expand_all_artificial_thunks(), function_called_by_processed_nodes_p(), gather_caller_stats(), gather_count_of_non_rec_edges(), get_info_about_necessary_edges(), growth_positive_p(), handle_missing_profiles(), cgraph_node::has_thunk_p(), has_undead_caller_from_outside_scc_p(), inline_call(), inline_small_functions(), ipa_propagate_frequency_1(), ipa_reverse_postorder(), ipa_tm_execute(), ipa_tm_note_irrevocable(), is_caller_ifunc_resolver(), propagate_comdat_group(), reachable_from_other_partition_p(), reachable_from_this_partition_p(), ipa_icf::redirect_all_callers(), symtab_node::referred_to_p(), remove_callee(), cgraph_node::remove_callers(), reset_edge_caches(), set_callee(), set_const_flag_1(), set_malloc_flag_1(), set_noreturn_flag_1(), set_nothrow_flag_1(), set_nothrow_function_flags(), set_single_call_flag(), sum_callers(), update_call_expr(), update_caller_keys(), and cgraph_node::verify_node().
cgraph_edge* cgraph_edge::prev_callee |
cgraph_edge* cgraph_edge::prev_caller |
Referenced by cgraph_node::create_edge(), inline_call(), remove_callee(), and set_callee().
unsigned int cgraph_edge::speculative |
Referenced by cgraph_add_edge_to_call_site_hash(), clone(), compute_fn_summary(), symbol_table::create_edge(), dump_edge_flags(), dump_inline_stats(), edge_set_predicate(), first_speculative_call_target(), ipa_devirt(), ipa_get_indirect_edge_target_1(), ipa_make_edge_direct_to_target(), ipa_merge_profiles(), ipcp_discover_new_direct_edges(), make_direct(), make_speculative(), next_speculative_call_target(), redirect_call_stmt_to_callee(), redirect_to_unreachable(), resolve_speculation(), set_call_stmt(), cgraph_node::set_call_stmt_including_clones(), speculation_useful_p(), speculative_call_indirect_edge(), speculative_call_target_ref(), try_make_edge_direct_virtual_call(), update_call_stmt_hash_for_removing_direct_edge(), update_indirect_edges_after_inlining(), cgraph_node::verify_node(), and verify_speculative_call().
unsigned int cgraph_edge::speculative_id |
Referenced by clone(), input_edge(), make_speculative(), and speculative_call_target_ref().