GCC Middle and Back End API Reference
dbgcnt.cc File Reference
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "diagnostic-core.h"
#include "dumpfile.h"
#include "selftest.h"
#include "intl.h"
#include "dbgcnt.h"
#include "dbgcnt.def"
Include dependency graph for dbgcnt.cc:

Data Structures

struct  string2counter_map
 

Macros

#define DEBUG_COUNTER(a)
 

Typedefs

typedef std::pair< unsigned int, unsigned int > limit_tuple
 

Functions

static void print_limit_reach (const char *counter, int limit, bool upper_p)
 
bool dbg_cnt (enum debug_counter index)
 
unsigned dbg_cnt_counter (enum debug_counter index)
 
static int cmp_tuples (const void *ptr1, const void *ptr2)
 
static bool dbg_cnt_set_limit_by_index (enum debug_counter index, const char *name, unsigned int low, unsigned int high)
 
static bool dbg_cnt_set_limit_by_name (const char *name, unsigned int low, unsigned int high)
 
static bool dbg_cnt_process_single_pair (char *name, char *str)
 
void dbg_cnt_process_opt (const char *arg)
 
void dbg_cnt_list_all_counters (void)
 

Variables

static struct string2counter_map map [debug_counter_number_of_counters]
 
static vec< limit_tuplelimits [debug_counter_number_of_counters]
 
static vec< limit_tupleoriginal_limits [debug_counter_number_of_counters]
 
static unsigned int count [debug_counter_number_of_counters]
 

Macro Definition Documentation

◆ DEBUG_COUNTER

#define DEBUG_COUNTER ( a)
Value:
{ #a , a },
Ca & a
Definition poly-int.h:770

Typedef Documentation

◆ limit_tuple

typedef std::pair<unsigned int, unsigned int> limit_tuple

Function Documentation

◆ cmp_tuples()

static int cmp_tuples ( const void * ptr1,
const void * ptr2 )
static
Compare limit_tuple intervals by first item in descending order.   

Referenced by dbg_cnt_set_limit_by_index().

◆ dbg_cnt()

bool dbg_cnt ( enum debug_counter index)

◆ dbg_cnt_counter()

unsigned dbg_cnt_counter ( enum debug_counter index)
Return the counter for INDEX.   

References count.

Referenced by dump_jump_thread_path().

◆ dbg_cnt_list_all_counters()

void dbg_cnt_list_all_counters ( void )
Print name, limit and count of all counters.    

References count, debug_counter_number_of_counters, G_, i, map, string2counter_map::name, and original_limits.

Referenced by finalize().

◆ dbg_cnt_process_opt()

void dbg_cnt_process_opt ( const char * arg)

◆ dbg_cnt_process_single_pair()

static bool dbg_cnt_process_single_pair ( char * name,
char * str )
static
Process a single "low:high" pair.
Returns NULL if there's no valid pair is found.
Otherwise returns a pointer to the end of the pair.  

References dbg_cnt_set_limit_by_name(), string2counter_map::name, and NULL.

Referenced by dbg_cnt_process_opt().

◆ dbg_cnt_set_limit_by_index()

static bool dbg_cnt_set_limit_by_index ( enum debug_counter index,
const char * name,
unsigned int low,
unsigned int high )
static

◆ dbg_cnt_set_limit_by_name()

static bool dbg_cnt_set_limit_by_name ( const char * name,
unsigned int low,
unsigned int high )
static

◆ print_limit_reach()

static void print_limit_reach ( const char * counter,
int limit,
bool upper_p )
static

References string2counter_map::counter, and dump_file.

Referenced by dbg_cnt().

Variable Documentation

◆ count

unsigned int count[debug_counter_number_of_counters]
static

Referenced by account_time_size(), accumulate_line_info(), diagnostic_context::action_after_output(), add_all_node_vals_to_toposort(), add_call_edges_for_seq(), add_stmt_cost(), add_stmt_cost(), vector_costs::add_stmt_cost(), add_taskreg_looptemp_clauses(), adjust_agg_replacement_values(), autofdo::afdo_annotate_cfg(), afdo_callsite_hot_enough_for_early_inline(), autofdo::afdo_propagate(), allocate_reload_reg(), double_int::alshift(), analyze_bb(), analyze_function_body(), analyze_increments(), double_int::arshift(), asm_str_count(), bb_ok_for_noce_convert_multiple_sets(), better_edge_p(), bit_value_binop(), bitmap_clear_range(), bitmap_clear_range(), bitmap_count_bits(), bitmap_count_bits(), bitmap_count_bits_in_word(), bitmap_count_unique_bits(), bitmap_set_range(), bitmap_set_range(), bitmap_single_bit_set_p(), build_fn_info(), build_vector_a_then_b(), calculate_spill_cost(), can_duplicate_and_interleave_p(), cgraph_edge_brings_all_scalars_for_node(), cgraph_update_edges_for_call_stmt_node(), vect_optimize_slp_pass::change_layout_cost(), cheap_bb_rtx_cost_p(), check_counter(), diagnostic_context::check_max_errors(), circuit(), wi::clrsb(), wi::clz(), compare_constant(), compute_alignments(), compute_branch_probabilities(), compute_call_stmt_bb_frequency(), path_range_query::compute_exit_dependencies(), compute_function_frequency(), compute_optimized_partition_bases(), compute_path_counts(), connect_traces(), consider_split(), const_hash_1(), const_unop(), const_vector_from_tree(), const_vector_int_elt(), const_vector_mask_from_tree(), const_with_all_bytes_same(), copy_bb(), count_bb_insns(), count_candidates(), count_formal_params(), count_occurrences(), count_patterns(), create_block_for_threading(), symbol_table::create_edge(), create_specialized_node(), xcallocator< Type >::data_alloc(), dbg_cnt(), dbg_cnt_counter(), dbg_cnt_list_all_counters(), debug_rtl_slim(), debug_rtx_list(), debug_set_count(), decide_whether_version_node(), decode_reg_name(), decrease_profile(), determine_scaling_factor(), determine_unlikely_bbs(), df_chain_create_bb_process_use(), df_install_mws(), df_install_refs(), df_reg_chain_mark(), df_reorganize_refs_by_reg_by_reg(), df_sort_and_compress_mws(), df_sort_and_compress_refs(), DFS::DFS_write_tree_body(), do_invalidate(), doloop_modify(), doloop_optimize(), doloop_simplify_count(), drop_tree_overflow(), profile_count::dump(), dump_histogram(), dump_histogram_value(), dump_ic_profile(), dump_incr_vec(), dump_profile(), gcc::dump_manager::dump_register(), dump_rtl_slim(), gcc::dump_manager::dump_start(), dump_stmt_cost(), ipa_fn_summary_t::duplicate(), back_jt_path_registry::duplicate_thread_path(), eliminate_tail_call(), vector_builder< T, Shape, Derived >::elt(), tree_switch_conversion::bit_test_cluster::emit(), emit_library_call_value_1(), ipa_icf::sem_variable::equals(), estimate_bb_frequencies(), estimate_local_effects(), estimate_num_insns(), evaluate_properties_for_edge(), exact_inverse(), execute_cse_reciprocals_1(), execute_split_functions(), expand_builtin_frame_address(), expand_builtin_return_addr(), expand_call_inline(), expand_case(), expand_doubleword_mod(), expand_omp_for_init_vars(), expand_simd_clones(), expand_vector_divmod(), expensive_function_p(), extract_left_shift(), fancy_abort(), fields_length(), find_implicit_sets(), find_lastprivate_looptemp(), find_more_contexts_for_caller_subset(), find_more_scalar_values_for_callers_subset(), find_traces_1_round(), fold_const_vec_convert(), fold_negate_expr_1(), fold_relational_const(), force_nonfallthru_and_redirect(), format_count(), wi::from_mpz(), gather_context_independent_values(), gcov_read_bytes(), generate_strlen_builtin_using_rawmemchr(), get_cycles_count(), range_def_chain::get_def_chain(), get_individual_bits(), get_info_about_necessary_edges(), get_nth_most_common_value(), gimple_account_profile_record(), gimple_divmod_fixed_value(), gimple_divmod_fixed_value_transform(), gimple_mod_pow2(), gimple_mod_pow2_value_transform(), gimple_mod_subtract_transform(), gimple_range_ssa_names(), gimple_stringop_fixed_value(), gimple_stringops_transform(), gimple_verify_flow_info(), go_define(), gsi_insert_finally_seq_after_call(), handle_cycle(), handle_spec_function(), operand_compare::hash_operand(), hash_tree(), init_lowered_empty_function(), init_noce_multiple_sets_info(), initialize_cfun(), input_cgraph_opt_section(), input_edge(), input_node(), input_node_opt_summary(), input_refs(), vect_optimize_slp_pass::internal_node_cost(), ipa_devirt(), ipa_fn_summary_write(), ipa_get_param_decl_index_1(), ipa_merge_fn_summary_after_inlining(), ipa_print_node_jump_functions_for_edge(), ipa_print_node_params(), ipa_print_order(), ipa_profile(), ipa_profile_generate_summary(), ipa_profile_read_summary(), ipa_profile_read_summary_section(), ipa_profile_write_summary(), ipa_prop_read_section(), ipa_prop_write_jump_functions(), ipa_read_edge_info(), ipa_read_jump_function(), ipa_reference_write_optimization_summary(), ipa_sra_summarize_function(), ipa_tm_insert_gettmclone_call(), ipa_tm_insert_irr_call(), ipa_write_jump_function(), ipcp_propagate_stage(), ipcp_store_vr_results(), ipcp_update_vr(), ipcp_verify_propagated_values(), ipcp_write_transformation_summaries(), is_addr_local(), tree_switch_conversion::bit_test_cluster::is_beneficial(), tree_switch_conversion::bit_test_cluster::is_beneficial(), isolate_path(), keyword_hash_init(), double_int::llshift(), loc_exp_dep_alloc(), loc_exp_dep_set(), lower_oacc_head_tail(), lower_omp_for(), lower_omp_for_lastprivate(), lower_reduction_clauses(), lra_dump_bitmap_with_title(), double_int::lrotate(), double_int::lrshift(), double_int::lshift(), double_int::lshift(), lshift_double(), lto_input_ts_vector_tree_pointers(), main(), make_compound_operation_int(), make_edges(), make_forwarders_with_degenerate_phis(), make_tree(), make_vector_bool_mode(), match_pattern_1(), maybe_create_decl_to_instance_map(), maybe_hot_count_p(), maybe_trim_constructor_store(), modified_type_die(), move_sese_region_to_fn(), mpz_get_double_int(), native_encode_initializer(), native_encode_vector(), native_encode_vector_part(), native_interpret_vector(), negate_expr_p(), new_mode(), generic_subrtx_iterator< T >::next(), noce_convert_multiple_sets_1(), nonzero_bits1(), oacc_loop_discover_walk(), omp_extract_for_data(), operand_compare::operand_equal_p(), optimize_bb_for_size_p(), optrecord_json_writer::optinfo_to_json(), output_cgraph_opt_summary(), output_file_names(), output_intermediate_json_line(), output_line_beginning(), output_refs(), param_change_prob(), partition_view_fini(), wi::popcount(), post_order_compute(), rtx_reuse_manager::preprocess(), print_all_lattices(), mem_usage::print_dash_line(), print_decision(), print_node(), probably_never_executed(), optrecord_json_writer::profile_count_to_json(), profile_record_check_consistency(), propagate_controlled_uses(), propagate_freq(), propagate_pure_const(), propagate_unlikely_bbs_forward(), pure_const_read_summary(), pure_const_write_summary(), push_agg_values_from_edge(), push_function_arg_decls(), push_function_arg_types(), autofdo::function_instance::read_function_instance(), read_ipcp_transformation_info(), read_replacements_section(), ipa_icf::sem_item_optimizer::read_section(), real_maybe_zerop(), real_zerop(), rebuild_frequencies(), record_stmt_cost(), record_stmt_cost(), record_stmt_cost(), record_stmt_cost(), record_stmt_cost(), reduce_to_bit_field_precision(), relate_compare_use_with_all_cands(), reload_cse_simplify(), remove_unused_ivs(), growing_rtx_properties< Base >::repeat(), reverse_op(), double_int::rrotate(), double_int::rshift(), double_int::rshift(), rshift_double(), rtl_account_profile_record(), scale_bbs_frequencies(), scale_bbs_frequencies_profile_count(), autofdo::edge_info::set_count(), set_even_probabilities(), setup_prohibited_and_exclude_class_mode_regs(), setup_reg_subrtx_bounds(), simplify_context::simplify_binary_operation_1(), simplify_const_binary_operation(), simplify_const_unary_operation(), simplify_shift_const(), simplify_shift_const_1(), single_block_loop_p(), split_edge(), ssa_fix_duplicate_block_edges(), statistics_fini_pass_1(), statistics_fini_pass_2(), store_constructor(), stream_out_bitmap(), stringop_block_profile(), subreg_get_info(), terminal_pattern_p(), transform_add_to_multiply(), try_widen_shift_mode(), update_bb_profile_for_threading(), update_jump_functions_after_inlining(), update_range_test(), valid_lattice_transition(), vect_analyze_group_access_1(), vect_grouped_load_supported(), vect_grouped_store_supported(), vect_lanes_optab_supported_p(), vect_load_lanes_supported(), vect_prune_runtime_alias_test_list(), vect_slp_node_weight(), vect_small_gap_p(), vect_store_lanes_supported(), vect_transform_reduction(), vect_transform_slp_perm_load_1(), vect_truncate_gather_scatter_offset(), vector_const_binop(), vector_cst_int_elt(), vectorizable_load(), vectorizable_slp_permutation_1(), vectorizable_store(), verify_imm_links(), want_remove_some_param_p(), warn_types_mismatch(), ipa_icf::sem_item_optimizer::write_summary(), and write_ts_vector_tree_pointers().

◆ limits

◆ map

Referenced by sarif_builder::add_any_include_chain(), nontrapping_dom_walker::add_or_mark_expr(), add_prefix_map(), autofdo::afdo_indirect_call(), autofdo::afdo_vpt(), dt_node::analyze(), attempt_coalesce(), basevar_index(), bitmap_alloc(), bitmap_bit_p(), bitmap_clear_bit(), bitmap_empty_p(), bitmap_gc_alloc(), bitmap_obstack_free(), bitmap_set_bit(), bmp_iter_set_init(), build_ssa_conflict_graph(), calculate_live_ranges(), change_loop(), ipa_icf_gimple::func_checker::classify_operands(), coalesce_bitint(), coalesce_partitions(), coalesce_ssa_name(), ipa_icf_gimple::func_checker::compare_asm_inputs_outputs(), compare_files(), ipa_icf_gimple::func_checker::compare_gimple_asm(), ipa_icf_gimple::func_checker::compare_gimple_assign(), ipa_icf_gimple::func_checker::compare_gimple_call(), ipa_icf_gimple::func_checker::compare_gimple_return(), compatible_calls_p(), compute_optimized_partition_bases(), autofdo::autofdo_source_profile::create(), create_coalesce_list_for_region(), hash_map< KeyId, Value, Traits >::create_ggc(), cgraph_node::create_virtual_clone(), dbg_cnt(), dbg_cnt_list_all_counters(), dbg_cnt_set_limit_by_name(), delete_var_map(), diagnostic_cb(), dump_bitmap(), dump_live_info(), dump_location_info(), dump_part_var_map(), dump_var_map(), duplicate_eh_regions(), expand_location_1(), find_replaceable_exprs(), find_replaceable_in_bb(), finish_tm_clone_pairs(), c_expr::gen_transform(), ana::supergraph::get_num_snodes(), ipa_icf_gimple::func_checker::get_operand_access_type(), get_parm_default_def_partitions(), get_undefined_value_partitions(), DFS::hash_scc(), ipa_icf::sem_function::hash_stmt(), diagnostic_text_output_format::includes_seen_p(), init_var_map(), initialize_conflict_count(), input_node_opt_summary(), ipa_comdats(), ipa_merge_fn_summary_after_inlining(), is_location_from_builtin_token(), iterate_fix_dominators(), linemap_client_expand_location_to_spelling_point(), lookup_external_ref(), maybe_duplicate_eh_stmt_fn(), maybe_unwind_expanded_macro_loc(), new_live_track(), new_temp_expr_table(), new_tree_live_info(), num_basevars(), num_var_partitions(), omp_sese_discover_pars(), omp_sese_find_par(), omp_sese_split_blocks(), optimize_external_refs(), optimize_external_refs_1(), optimize_range_tests_var_bound(), output_line_directive(), output_node_opt_summary(), partition_to_var(), partition_view_bitmap(), partition_view_fini(), partition_view_init(), partition_view_normal(), propagate_comdat_group(), queue_phi_copy_p(), region_contains_p(), remap_filename(), modref_tree< T >::remap_params(), remove_some_program_points_and_update_live_ranges(), remove_some_program_points_and_update_live_ranges(), remove_ssa_form(), diagnostic_text_output_format::report_current_module(), restrict_cost_classes(), rewrite_trees(), sbitmap_free(), sbitmap_size_bytes(), set_parm_default_def_partition(), simd_clone_compute_base_data_type(), solve_constraints(), sort_coalesce_list(), pair_fusion_bb_info::traverse_base_map(), autofdo::autofdo_source_profile::update_inlined_ind_target(), var_map_base_fini(), var_to_partition(), var_to_partition_to_var(), var_union(), vect_build_slp_tree_2(), vect_get_and_check_slp_defs(), verify_live_on_entry(), version_to_var(), ipa_icf_gimple::visit_load_store(), and write_digit_row().

◆ original_limits