GCC Middle and Back End API Reference
|
Functions | |
static void | init_ic_make_global_vars () |
void | gimple_init_edge_profiler () |
void | gimple_gen_edge_profiler () |
static tree | prepare_instrumented_value () |
void | gimple_gen_interval_profiler () |
void | gimple_gen_pow2_profiler () |
void | gimple_gen_one_value_profiler () |
void | gimple_gen_ic_profiler () |
void | gimple_gen_ic_func_profiler () |
void | gimple_gen_const_delta_profiler (histogram_value value, unsigned tag, unsigned base) |
void | gimple_gen_average_profiler () |
void | gimple_gen_ior_profiler () |
static unsigned int | tree_profiling () |
static bool | gate_tree_profile_ipa () |
simple_ipa_opt_pass * | make_pass_ipa_tree_profile () |
Variables | |
static tree | gcov_type_node |
static tree | tree_interval_profiler_fn |
static tree | tree_pow2_profiler_fn |
static tree | tree_one_value_profiler_fn |
static tree | tree_indirect_call_profiler_fn |
static tree | tree_average_profiler_fn |
static tree | tree_ior_profiler_fn |
static tree | ic_void_ptr_var |
static tree | ic_gcov_type_ptr_var |
static tree | ptr_void |
|
static |
When profile instrumentation, use or test coverage shall be performed.
void gimple_gen_average_profiler | ( | ) |
Output instructions as GIMPLE trees to increment the average histogram counter. VALUE is the expression whose value is profiled. TAG is the tag of the section for counters, BASE is offset of the counter position.
References force_gimple_operand_gsi(), gimple_build_call(), gsi_for_stmt(), gsi_insert_before(), GSI_NEW_STMT, GSI_SAME_STMT, histogram_value_t::hvalue, prepare_instrumented_value(), histogram_value_t::stmt, tree_average_profiler_fn, and tree_coverage_counter_addr().
Referenced by instrument_values().
void gimple_gen_const_delta_profiler | ( | histogram_value | value, |
unsigned | tag, | ||
unsigned | base | ||
) |
Output instructions as GIMPLE trees for code to find the most common value of a difference between two evaluations of an expression. VALUE is the expression whose value is profiled. TAG is the tag of the section for counters, BASE is offset of the counter position.
References internal_error().
Referenced by instrument_values().
void gimple_gen_edge_profiler | ( | ) |
Output instructions as GIMPLE trees to increment the edge execution count, and insert them on E. We rely on gsi_insert_on_edge to preserve the order.
References build_int_cst(), gcov_type_node, gimple_assign_lhs(), gimple_build_assign_with_ops(), gsi_insert_on_edge(), make_temp_ssa_name(), tree_coverage_counter_ref(), and unshare_expr().
Referenced by instrument_edges().
void gimple_gen_ic_func_profiler | ( | void | ) |
Output instructions as GIMPLE trees for code to find the most common called function in indirect call. Insert instructions at the beginning of every possible called function.
References build_addr(), build_int_cst(), build_pointer_type(), cgraph_get_node(), cgraph_only_called_directly_p(), current_function_decl, force_gimple_operand_gsi(), gcov_type_node, gimple_build_call(), gimple_init_edge_profiler(), gsi_after_labels(), gsi_insert_before(), GSI_SAME_STMT, ic_gcov_type_ptr_var, ic_void_ptr_var, cgraph_node::profile_id, single_succ_edge(), split_edge(), and tree_indirect_call_profiler_fn.
Referenced by tree_profiling().
void gimple_gen_ic_profiler | ( | ) |
Output instructions as GIMPLE trees for code to find the most common called function in indirect call. VALUE is the call expression whose indirect callee is profiled. TAG is the tag of the section for counters, BASE is offset of the counter position.
References force_gimple_operand_gsi(), gimple_assign_lhs(), gsi_for_stmt(), gsi_insert_before(), GSI_SAME_STMT, histogram_value_t::hvalue, ic_gcov_type_ptr_var, ic_void_ptr_var, make_temp_ssa_name(), ptr_void, histogram_value_t::stmt, tree_coverage_counter_addr(), unshare_expr(), and histogram_value_t::value.
Referenced by instrument_values().
void gimple_gen_interval_profiler | ( | ) |
Output instructions as GIMPLE trees to increment the interval histogram counter. VALUE is the expression whose value is profiled. TAG is the tag of the section for counters, BASE is offset of the counter position.
References build_addr(), build_int_cst_type(), current_function_decl, force_gimple_operand_gsi(), gimple_build_call(), gsi_for_stmt(), gsi_insert_before(), GSI_NEW_STMT, GSI_SAME_STMT, histogram_value_t::hdata, histogram_value_t::hvalue, histogram_value_t::intvl, prepare_instrumented_value(), histogram_value_t::stmt, tree_coverage_counter_ref(), and tree_interval_profiler_fn.
Referenced by instrument_values().
void gimple_gen_ior_profiler | ( | ) |
Output instructions as GIMPLE trees to increment the ior histogram counter. VALUE is the expression whose value is profiled. TAG is the tag of the section for counters, BASE is offset of the counter position.
References force_gimple_operand_gsi(), gimple_build_call(), gsi_for_stmt(), gsi_insert_before(), GSI_NEW_STMT, GSI_SAME_STMT, histogram_value_t::hvalue, prepare_instrumented_value(), histogram_value_t::stmt, tree_coverage_counter_addr(), and tree_ior_profiler_fn.
Referenced by instrument_values().
void gimple_gen_one_value_profiler | ( | ) |
Output instructions as GIMPLE trees for code to find the most common value. VALUE is the expression whose value is profiled. TAG is the tag of the section for counters, BASE is offset of the counter position.
References force_gimple_operand_gsi(), gimple_build_call(), gsi_for_stmt(), gsi_insert_before(), GSI_NEW_STMT, GSI_SAME_STMT, histogram_value_t::hvalue, prepare_instrumented_value(), histogram_value_t::stmt, tree_coverage_counter_addr(), and tree_one_value_profiler_fn.
Referenced by instrument_values().
void gimple_gen_pow2_profiler | ( | ) |
Output instructions as GIMPLE trees to increment the power of two histogram counter. VALUE is the expression whose value is profiled. TAG is the tag of the section for counters, BASE is offset of the counter position.
References force_gimple_operand_gsi(), gimple_build_call(), gsi_for_stmt(), gsi_insert_before(), GSI_NEW_STMT, GSI_SAME_STMT, histogram_value_t::hvalue, prepare_instrumented_value(), histogram_value_t::stmt, tree_coverage_counter_addr(), and tree_pow2_profiler_fn.
Referenced by instrument_values().
void gimple_init_edge_profiler | ( | void | ) |
Create the type and function decls for the interface with gcov.
References build_fn_decl(), build_function_type_list(), build_pointer_type(), gcov_type_node, get_gcov_type(), get_identifier(), init_ic_make_global_vars(), ptr_void, tree_average_profiler_fn, tree_indirect_call_profiler_fn, tree_interval_profiler_fn, tree_ior_profiler_fn, tree_one_value_profiler_fn, and tree_pow2_profiler_fn.
Referenced by branch_prob(), and gimple_gen_ic_func_profiler().
|
static |
Do initialization work for the edge profiler.
Add code: __thread gcov* __gcov_indirect_call_counters; // pointer to actual counter __thread void* __gcov_indirect_call_callee; // actual callee address
References build_pointer_type(), decl_default_tls_model(), get_gcov_type(), get_identifier(), targetm, varpool_finalize_decl(), and VISIBILITY_HIDDEN.
Referenced by gimple_init_edge_profiler().
simple_ipa_opt_pass* make_pass_ipa_tree_profile | ( | ) |
|
static |
Emits code to get VALUE to instrument at GSI, and returns the variable containing the value.
References build_nonstandard_integer_type(), force_gimple_operand_gsi(), gcov_type_node, GSI_SAME_STMT, histogram_value_t::hvalue, and histogram_value_t::value.
Referenced by gimple_gen_average_profiler(), gimple_gen_interval_profiler(), gimple_gen_ior_profiler(), gimple_gen_one_value_profiler(), and gimple_gen_pow2_profiler().
|
static |
Profile all functions in the callgraph.
References branch_prob(), CDI_DOMINATORS, CDI_POST_DOMINATORS, cgraph_set_const_flag(), cgraph_set_pure_flag(), CGRAPH_STATE_IPA_SSA, cleanup_tree_cfg(), cgraph_node::clone_of, symtab_node_base::decl, del_node_map(), execute_fixup_cfg(), free_dominance_info(), gimple_gen_ic_func_profiler(), gimple_has_body_p(), gimple_value_profile_transformations(), gsi_end_p(), gsi_next(), gsi_start_bb(), gsi_stmt(), init_node_map(), is_gimple_call(), pop_cfun(), push_cfun(), rebuild_cgraph_edges(), cgraph_node::symbol, update_ssa(), and update_stmt().
|
static |
@verbatim Calculate branch probabilities, and basic block execution counts.
Copyright (C) 1990-2013 Free Software Foundation, Inc. Contributed by James E. Wilson, UC Berkeley/Cygnus Support; based on some ideas from Dain Samples of UC Berkeley. Further mangling by Bob Manson, Cygnus Support. Converted to use trees by Dale Johannesen, Apple Computer.
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/.
Generate basic block profile instrumentation and auxiliary files. Tree-based version. See profile.c for overview.
Referenced by gimple_gen_edge_profiler(), gimple_gen_ic_func_profiler(), gimple_init_edge_profiler(), prepare_instrumented_value(), tree_coverage_counter_addr(), and tree_coverage_counter_ref().
|
static |
Referenced by gimple_gen_ic_func_profiler(), and gimple_gen_ic_profiler().
|
static |
Referenced by gimple_gen_ic_func_profiler(), and gimple_gen_ic_profiler().
|
static |
Referenced by gimple_gen_ic_profiler(), and gimple_init_edge_profiler().
|
static |
Referenced by gimple_gen_average_profiler(), and gimple_init_edge_profiler().
|
static |
Referenced by gimple_gen_ic_func_profiler(), and gimple_init_edge_profiler().
|
static |
Referenced by gimple_gen_interval_profiler(), and gimple_init_edge_profiler().
|
static |
Referenced by gimple_gen_ior_profiler(), and gimple_init_edge_profiler().
|
static |
Referenced by gimple_gen_one_value_profiler(), and gimple_init_edge_profiler().
|
static |
Referenced by gimple_gen_pow2_profiler(), and gimple_init_edge_profiler().