GCC Middle and Back End API Reference
|
Data Structures | |
struct | statistics_counter_s |
struct | stats_counter_hasher |
Typedefs | |
typedef struct statistics_counter_s | statistics_counter_t |
typedef hash_table < stats_counter_hasher > | stats_counter_table_type |
Functions | |
static stats_counter_table_type | curr_statistics_hash () |
int | statistics_fini_pass_1 (statistics_counter_t **slot, void *data) |
int | statistics_fini_pass_2 (statistics_counter_t **slot, void *data) |
int | statistics_fini_pass_3 (statistics_counter_t **slot, void *data) |
void | statistics_fini_pass () |
int | statistics_fini_1 () |
void | statistics_fini () |
void | statistics_early_init () |
void | statistics_init () |
static statistics_counter_t * | lookup_or_add_counter (stats_counter_table_type hash, const char *id, int val, bool histogram_p) |
void | statistics_counter_event () |
void | statistics_histogram_event () |
Variables | |
static int | statistics_dump_nr |
static int | statistics_dump_flags |
static FILE * | statistics_dump_file |
static stats_counter_table_type * | statistics_hashes |
static unsigned | nr_statistics_hashes |
typedef struct statistics_counter_s statistics_counter_t |
Statistics entry. A integer counter associated to a string ID and value.
|
static |
Return the current hashtable to be used for recording or printing statistics.
References hash_table< Descriptor, Allocator >::create(), current_pass, memset(), nr_statistics_hashes, and opt_pass::static_pass_number.
Referenced by statistics_counter_event(), statistics_fini_pass(), and statistics_histogram_event().
|
static |
Lookup or add a statistics counter in the hashtable HASH with ID, VAL and HISTOGRAM_P.
References hash_table< Descriptor, Allocator >::find_slot(), statistics_counter_s::id, and statistics_counter_s::val.
Referenced by statistics_counter_event(), and statistics_histogram_event().
void statistics_counter_event | ( | ) |
Add statistics information about event ID in function FN. This will increment the counter associated with ID by INCR. It will also dump the event to the global statistics file if requested.
References statistics_counter_s::count, curr_statistics_hash(), current_pass, dump_flags, function_name(), statistics_counter_s::histogram_p, lookup_or_add_counter(), pass_data::name, opt_pass::static_pass_number, statistics_dump_file, and statistics_dump_flags.
Referenced by analyze_all_variable_accesses(), do_pre(), execute_cse_reciprocals(), execute_cse_sincos(), execute_fre(), execute_optimize_bswap(), execute_optimize_widening_mul(), execute_sink_code(), fini_reassoc(), gcse_after_reload_main(), ipa_early_sra(), perform_intra_sra(), perform_tree_ssa_dce(), process_assert_insertions(), release_dead_ssa_names(), remove_unused_locals(), rename_ssa_copies(), substitute_and_fold(), thread_through_all_blocks(), tree_ssa_dominator_optimize(), and vectorize_loops().
void statistics_early_init | ( | void | ) |
Register the statistics dump file.
References dump_register(), and statistics_dump_nr.
Referenced by general_init().
void statistics_fini | ( | void | ) |
Finish the statistics and dump summary information.
References dump_end(), g, gcc::pass_manager::get_pass_for_id(), gcc::context::get_passes(), nr_statistics_hashes, statistics_dump_file, statistics_dump_flags, and statistics_dump_nr.
Referenced by finalize().
int statistics_fini_1 | ( | ) |
Helper for printing summary information.
References statistics_counter_s::count, statistics_counter_s::histogram_p, HOST_WIDE_INT_PRINT_DEC, statistics_counter_s::id, pass_data::name, opt_pass::static_pass_number, statistics_dump_file, and statistics_counter_s::val.
void statistics_fini_pass | ( | void | ) |
Dump the current statistics incrementally.
References curr_statistics_hash(), current_pass, dump_file, dump_flags, opt_pass::static_pass_number, statistics_dump_file, statistics_dump_flags, statistics_fini_pass_1(), statistics_fini_pass_2(), statistics_fini_pass_3(), and hash_table< Descriptor, Allocator >::traverse_noresize().
Referenced by execute_todo().
int statistics_fini_pass_1 | ( | statistics_counter_t ** | slot, |
void * | data | ||
) |
Helper for statistics_fini_pass. Print the counter difference since the last dump for the pass dump files.
References statistics_counter_s::count, count, dump_file, statistics_counter_s::histogram_p, HOST_WIDE_INT, HOST_WIDE_INT_PRINT_DEC, statistics_counter_s::id, statistics_counter_s::prev_dumped_count, and statistics_counter_s::val.
Referenced by statistics_fini_pass().
int statistics_fini_pass_2 | ( | statistics_counter_t ** | slot, |
void * | data | ||
) |
Helper for statistics_fini_pass. Print the counter difference since the last dump for the statistics dump.
References statistics_counter_s::count, count, current_function_name(), current_pass, statistics_counter_s::histogram_p, HOST_WIDE_INT, HOST_WIDE_INT_PRINT_DEC, statistics_counter_s::id, pass_data::name, statistics_counter_s::prev_dumped_count, opt_pass::static_pass_number, statistics_dump_file, and statistics_counter_s::val.
Referenced by statistics_fini_pass().
int statistics_fini_pass_3 | ( | statistics_counter_t ** | slot, |
void * | data | ||
) |
Helper for statistics_fini_pass, reset the counters.
References statistics_counter_s::count, and statistics_counter_s::prev_dumped_count.
Referenced by statistics_fini_pass().
void statistics_histogram_event | ( | ) |
Add statistics information about event ID in function FN with the histogram value VAL. It will dump the event to the global statistics file if requested.
References statistics_counter_s::count, curr_statistics_hash(), current_pass, dump_flags, function_name(), statistics_counter_s::histogram_p, lookup_or_add_counter(), pass_data::name, opt_pass::static_pass_number, statistics_dump_file, and statistics_dump_flags.
Referenced by compute_antic(), insert(), and process_scc().
void statistics_init | ( | void | ) |
Init the statistics.
References dump_begin(), get_dump_file_info(), dump_file_info::pflags, statistics_dump_file, statistics_dump_flags, and statistics_dump_nr.
Referenced by do_compile().
|
static |
Referenced by curr_statistics_hash(), and statistics_fini().
|
static |
|
static |
|
static |
@verbatim Optimization statistics functions.
Copyright (C) 2008-2013 Free Software Foundation, Inc. Contributed by Richard Guenther rguen ther @suse .de
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/.
Referenced by statistics_early_init(), statistics_fini(), and statistics_init().
|
static |
Array of statistic hashes, indexed by pass id.