GCC Middle and Back End API Reference
|
Go to the source code of this file.
Enumerations | |
enum | br_predictor { END_PREDICTORS } |
enum | prediction { NOT_TAKEN, TAKEN } |
Functions | |
void | predict_insn_def (rtx, enum br_predictor, enum prediction) |
int | counts_to_freqs (void) |
void | estimate_bb_frequencies (void) |
const char * | predictor_name (enum br_predictor) |
tree | build_predict_expr (enum br_predictor, enum prediction) |
void | tree_estimate_probability (void) |
void | compute_function_frequency (void) |
void | rebuild_frequencies (void) |
enum br_predictor |
enum prediction |
tree build_predict_expr | ( | enum | br_predictor, |
enum | prediction | ||
) |
void compute_function_frequency | ( | void | ) |
Decide whether function is hot, cold or unlikely executed.
References cfun, cgraph_get_node(), current_function_decl, flags_from_decl_or_type(), lookup_attribute(), maybe_hot_bb_p(), NODE_FREQUENCY_EXECUTED_ONCE, NODE_FREQUENCY_HOT, NODE_FREQUENCY_NORMAL, NODE_FREQUENCY_UNLIKELY_EXECUTED, cgraph_node::only_called_at_exit, cgraph_node::only_called_at_startup, probably_never_executed_bb_p(), and profile_info.
Referenced by compute_branch_probabilities(), estimate_bb_frequencies(), and execute_fixup_cfg().
int counts_to_freqs | ( | void | ) |
Convert counts measured by profile driven feedback to frequencies. Return nonzero iff there was any nonzero execution count.
References basic_block_def::count, and basic_block_def::frequency.
Referenced by compute_branch_probabilities(), estimate_bb_frequencies(), gimple_value_profile_transformations(), and rebuild_frequencies().
void estimate_bb_frequencies | ( | void | ) |
Estimate basic blocks frequency by given branch probabilities.
References alloc_aux_for_blocks(), alloc_aux_for_edges(), compute_function_frequency(), counts_to_freqs(), estimate_loops(), free_aux_for_blocks(), free_aux_for_edges(), frequency, basic_block_def::frequency, mark_dfs_back_edges(), memcpy(), edge_def::probability, PROFILE_READ, single_succ_edge(), sreal_add(), sreal_compare(), sreal_div(), sreal_init(), sreal_mul(), sreal_sub(), sreal_to_int(), and basic_block_def::succs.
Referenced by rebuild_frequencies(), and tree_estimate_probability().
void predict_insn_def | ( | rtx | insn, |
enum br_predictor | predictor, | ||
enum prediction | taken | ||
) |
Predict insn by given predictor.
References predict_insn(), and TAKEN.
Referenced by bb_estimate_probability_locally(), and stack_protect_epilogue().
const char* predictor_name | ( | enum | br_predictor | ) |
void rebuild_frequencies | ( | void | ) |
Rebuild function frequencies. Passes are in general expected to maintain profile by hand, however in some cases this is not possible: for example when inlining several functions with loops freuqencies might run out of scale and thus needs to be recomputed.
References add_noreturn_fake_exit_edges(), connect_infinite_loops_to_exit(), counts_to_freqs(), estimate_bb_frequencies(), loop_optimizer_finalize(), loop_optimizer_init(), mark_irreducible_loops(), PROFILE_GUESSED, PROFILE_READ, remove_fake_exit_edges(), timevar_pop(), and timevar_push().
Referenced by execute_function_todo(), and tree_function_versioning().
void tree_estimate_probability | ( | void | ) |
Predict branch probabilities and estimate profile of the tree CFG. This function can be called from the loop optimizers to recompute the profile information.
References add_noreturn_fake_exit_edges(), assert_is_empty(), calculate_dominance_info(), CDI_POST_DOMINATORS, cfun, combine_predictions_for_bb(), connect_infinite_loops_to_exit(), CP_SIMPLE_PREHEADERS, create_preheaders(), estimate_bb_frequencies(), free_dominance_info(), number_of_loops(), pointer_map_create(), pointer_map_destroy(), pointer_map_traverse(), predict_loops(), record_loop_exits(), remove_fake_exit_edges(), tree_bb_level_predictions(), and tree_estimate_probability_bb().
Referenced by graphite_finalize(), and tree_estimate_probability_driver().