GCC Middle and Back End API Reference
|
Data Structures | |
struct | record_reference_ctx |
Functions | |
static tree | record_reference () |
static void | record_type_list () |
static void | record_eh_tables () |
int | compute_call_stmt_bb_frequency () |
static bool | mark_address () |
static bool | mark_load () |
static bool | mark_store () |
void | ipa_record_stmt_references () |
static unsigned int | build_cgraph_edges () |
gimple_opt_pass * | make_pass_build_cgraph_edges () |
void | record_references_in_initializer () |
unsigned int | rebuild_cgraph_edges () |
void | cgraph_rebuild_references () |
gimple_opt_pass * | make_pass_rebuild_cgraph_edges () |
static unsigned int | remove_cgraph_callee_edges () |
gimple_opt_pass * | make_pass_remove_cgraph_callee_edges () |
|
static |
Create cgraph edges for function calls. Also look for functions and variables having addresses taken.
References cfun, cgraph_create_edge(), cgraph_create_indirect_edge(), cgraph_get_create_node(), cgraph_get_create_real_symbol_node(), cgraph_get_node(), compute_call_stmt_bb_frequency(), basic_block_def::count, current_function_decl, gimple_call_flags(), gimple_call_fndecl(), gimple_omp_parallel_child_fn(), gimple_omp_task_child_fn(), gimple_omp_task_copy_fn(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), ipa_record_reference(), ipa_record_stmt_references(), IPA_REF_ADDR, is_gimple_call(), is_gimple_debug(), pointer_set_create(), pointer_set_destroy(), record_eh_tables(), varpool_finalize_decl(), and visited_nodes.
void cgraph_rebuild_references | ( | void | ) |
Rebuild cgraph edges for current function node. This needs to be run after passes that don't update the cgraph.
References cfun, cgraph_get_node(), cgraph_node::count, current_function_decl, gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), ipa_record_stmt_references(), ipa_remove_reference(), record_eh_tables(), symtab_node_base::ref_list, ipa_ref::speculative, and cgraph_node::symbol.
Referenced by tree_function_versioning().
int compute_call_stmt_bb_frequency | ( | ) |
Computes the frequency of the call statement so that it can be stored in cgraph_edge. BB is the basic block of the call statement.
References basic_block_def::frequency, and PROFILE_ABSENT.
void ipa_record_stmt_references | ( | ) |
Record all references from NODE that are taken in statement STMT.
References mark_address(), mark_load(), mark_store(), and walk_stmt_load_store_addr_ops().
gimple_opt_pass* make_pass_build_cgraph_edges | ( | ) |
gimple_opt_pass* make_pass_rebuild_cgraph_edges | ( | ) |
gimple_opt_pass* make_pass_remove_cgraph_callee_edges | ( | ) |
|
static |
Mark address taken in STMT.
References cgraph_get_create_real_symbol_node(), cgraph_mark_address_taken_node(), get_base_address(), ipa_record_reference(), IPA_REF_ADDR, and varpool_node_for_decl().
Referenced by ipa_record_stmt_references().
|
static |
Mark load of T.
References cgraph_get_create_real_symbol_node(), cgraph_mark_address_taken_node(), get_base_address(), ipa_record_reference(), IPA_REF_ADDR, IPA_REF_LOAD, and varpool_node_for_decl().
Referenced by ipa_record_stmt_references().
|
static |
Mark store of T.
References get_base_address(), ipa_record_reference(), IPA_REF_STORE, and varpool_node_for_decl().
Referenced by ipa_record_stmt_references().
unsigned int rebuild_cgraph_edges | ( | void | ) |
Rebuild cgraph edges for current function node. This needs to be run after passes that don't update the cgraph.
References cfun, cgraph_create_edge(), cgraph_create_indirect_edge(), cgraph_get_create_node(), cgraph_get_node(), cgraph_node_remove_callees(), compute_call_stmt_bb_frequency(), basic_block_def::count, cgraph_node::count, current_function_decl, gimple_call_flags(), gimple_call_fndecl(), cgraph_node::global, gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_start_phis(), gsi_stmt(), cgraph_global_info::inlined_to, ipa_record_stmt_references(), ipa_remove_all_references(), is_gimple_call(), record_eh_tables(), symtab_node_base::ref_list, and cgraph_node::symbol.
Referenced by apply_ipa_transforms(), execute_function_todo(), expand_omp_taskreg(), expand_thunk(), ipa_tm_scan_calls_transaction(), modify_function(), split_function(), and tree_profiling().
|
static |
Record all references we will introduce by producing EH tables for NODE.
References eh_region_d::eh_region_u::allowed, cgraph_get_create_real_symbol_node(), cgraph_mark_address_taken_node(), symtab_node_base::decl, eh_region_d::eh_region_u::eh_try, ERT_ALLOWED_EXCEPTIONS, ERT_CLEANUP, ERT_MUST_NOT_THROW, ERT_TRY, eh_region_d::eh_region_u::eh_region_u_try::first_catch, eh_region_d::inner, ipa_record_reference(), IPA_REF_ADDR, eh_catch_d::next_catch, eh_region_d::next_peer, eh_region_d::outer, record_type_list(), cgraph_node::symbol, eh_region_d::type, eh_catch_d::type_list, eh_region_d::eh_region_u::eh_region_u_allowed::type_list, and eh_region_d::u.
Referenced by build_cgraph_edges(), cgraph_rebuild_references(), and rebuild_cgraph_edges().
|
static |
Walk tree and record all calls and references to functions/variables. Called via walk_tree: TP is pointer to tree to be examined. When DATA is non-null, record references to callgraph.
References canonicalize_constructor_val(), cgraph_get_create_real_symbol_node(), cgraph_mark_address_taken_node(), get_base_var(), ipa_record_reference(), IPA_REF_ADDR, record_reference_ctx::only_vars, record_reference_ctx::varpool_node, and varpool_node_for_decl().
Referenced by record_references_in_initializer().
void record_references_in_initializer | ( | ) |
Record references to functions and other variables present in the initial value of DECL, a variable. When ONLY_VARS is true, we mark needed only variables, not functions.
References record_reference_ctx::only_vars, pointer_set_create(), pointer_set_destroy(), record_reference(), record_reference_ctx::varpool_node, varpool_node_for_decl(), and visited_nodes.
|
static |
Record references to typeinfos in the type list LIST.
References ipa_record_reference(), IPA_REF_ADDR, lookup_type_for_runtime(), and varpool_node_for_decl().
Referenced by record_eh_tables().
|
static |