#include "config.h"#include "system.h"#include "tree.h"#include "rtl.h"#include "tm_p.h"#include "hard-reg-set.h"#include "basic-block.h"#include "insn-config.h"#include "regs.h"#include "flags.h"#include "output.h"#include "function.h"#include "except.h"#include "toplev.h"#include "recog.h"#include "expr.h"#include "predict.h"#include "profile.h"#include "real.h"#include "params.h"#include "target.h"#include "loop.h"#include "predict.def"

Go to the source code of this file.
| #define BLOCK_INFO | ( | B | ) | ((block_info) (B)->aux) |
Definition at line 925 of file predict.c.
Referenced by estimate_bb_frequencies(), estimate_loops_at_level(), and propagate_freq().
| #define DEF_PREDICTOR | ( | ENUM, | |||
| NAME, | |||||
| HITRATE, | |||||
| FLAGS | ) | {NAME, HITRATE, FLAGS}, |
| #define EDGE_INFO | ( | E | ) | ((edge_info) (E)->aux) |
Definition at line 926 of file predict.c.
Referenced by branch_prob(), compute_branch_probabilities(), estimate_bb_frequencies(), estimate_loops_at_level(), find_spanning_tree(), get_exec_counts(), instrument_edges(), and propagate_freq().
| #define HITRATE | ( | VAL | ) | ((int) ((VAL) * REG_BR_PROB_BASE + 50) / 100) |
Definition at line 112 of file predict.c.
Referenced by predict_loops(), and probability_reliable_p().
| #define PRED_FLAG_FIRST_MATCH 1 |
Definition at line 108 of file predict.c.
Referenced by combine_predictions_for_bb(), and combine_predictions_for_insn().
| #define PROB_EVEN (REG_BR_PROB_BASE / 2) |
Definition at line 71 of file predict.c.
Referenced by combine_predictions_for_bb(), and combine_predictions_for_insn().
| #define PROB_VERY_LIKELY (REG_BR_PROB_BASE - PROB_VERY_UNLIKELY) |
| typedef struct block_info_def * block_info |
| typedef struct edge_info_def * edge_info |
Definition at line 250 of file predict.c.
References any_condjump_p(), BLOCK_FOR_INSN, and GET_CODE.
Referenced by bb_estimate_probability_locally(), combine_predictions_for_insn(), estimate_bb_frequencies(), estimate_probability(), predict_loops(), and process_note_prediction().
Definition at line 1275 of file predict.c.
References build_string(), cfun, current_function_decl, DECL_ONE_ONLY, DECL_SECTION_NAME, FUNCTION_FREQUENCY_HOT, FUNCTION_FREQUENCY_UNLIKELY_EXECUTED, gcc_target::have_named_sections, HOT_TEXT_SECTION_NAME, strlen(), targetm, and UNLIKELY_EXECUTED_TEXT_SECTION_NAME.
Referenced by estimate_bb_frequencies().
| static void combine_predictions_for_insn | ( | rtx | insn, | |
| basic_block | bb | |||
| ) | [static] |
Definition at line 331 of file predict.c.
References BRANCH_EDGE, d, double, dump_prediction(), FALLTHRU_EDGE, find_reg_note(), flags, fprintf(), GEN_INT, gen_rtx_EXPR_LIST, basic_block_def::index, INSN_UID, INTVAL, PRED_FLAG_FIRST_MATCH, PROB_EVEN, REG_BR_PRED, REG_BR_PROB, REG_BR_PROB_BASE, REG_NOTE_KIND, REG_NOTES, rtl_dump_file, basic_block_def::succ, edge::succ_next, and XEXP.
Referenced by estimate_probability(), and guess_outgoing_edge_probabilities().
Definition at line 1253 of file predict.c.
References cfun, flag_branch_probabilities, FOR_EACH_BB, FUNCTION_FREQUENCY_HOT, FUNCTION_FREQUENCY_NORMAL, FUNCTION_FREQUENCY_UNLIKELY_EXECUTED, maybe_hot_bb_p(), and probably_never_executed_bb_p().
Referenced by estimate_bb_frequencies().
Definition at line 1095 of file predict.c.
References BB_FREQ_MAX, basic_block_def::count, ENTRY_BLOCK_PTR, FOR_BB_BETWEEN, FOR_EACH_BB, basic_block_def::frequency, HOST_WIDEST_INT, MAX, and NULL.
Referenced by compute_branch_probabilities(), estimate_bb_frequencies(), optimize_inline_calls(), and tree_value_profile_transformations().
| static void dump_prediction | ( | enum br_predictor | predictor, | |
| int | probability, | |||
| basic_block | bb, | |||
| int | used | |||
| ) | [static] |
Definition at line 294 of file predict.c.
References basic_block_def::count, EDGE_FALLTHRU, edge::flags, fprintf(), HOST_WIDEST_INT_PRINT_DEC, REG_BR_PROB_BASE, rtl_dump_file, basic_block_def::succ, and edge::succ_next.
Referenced by combine_predictions_for_bb(), and combine_predictions_for_insn().
Definition at line 1153 of file predict.c.
References alloc_aux_for_blocks(), alloc_aux_for_edges(), BB_FREQ_MAX, BLOCK_INFO, can_predict_insn_p(), choose_function_section(), compute_function_frequency(), counts_to_freqs(), double_mode, double_type_node, EDGE_INFO, basic_block_def::end, ENTRY_BLOCK_PTR, estimate_loops_at_level(), flag_branch_probabilities, flag_reorder_functions, FOR_BB_BETWEEN, FOR_EACH_BB, free_aux_for_blocks(), free_aux_for_edges(), basic_block_def::frequency, frequency, last_insn, mark_dfs_back_edges(), memcpy, NULL, real_almost_one, REAL_ARITHMETIC, real_bb_freq_max, real_br_prob_base, real_inv_br_prob_base, real_one, real_one_half, REAL_VALUE_FROM_INT, REAL_VALUE_TYPE, REAL_VALUE_UNSIGNED_FIX, REAL_VALUES_LESS, real_zero, REG_BR_PROB_BASE, basic_block_def::succ, edge::succ_next, tmp, and TYPE_MODE.
Referenced by estimate_probability(), and tree_estimate_probability().
Definition at line 1064 of file predict.c.
References BLOCK_INFO, EDGE_INFO, free(), get_loop_body(), i, loop::inner, loop::latch, loop_latch_edge(), loop::next, loop::num_nodes, propagate_freq(), and basic_block_def::succ.
Referenced by estimate_bb_frequencies(), and estimate_loops_at_level().
Definition at line 433 of file predict.c.
Referenced by rest_of_compilation(), and rest_of_handle_branch_prob().
Definition at line 653 of file predict.c.
Referenced by rest_of_compilation(), and rest_of_handle_jump2().
| bool expensive_function_p | ( | int | threshold | ) |
Definition at line 1113 of file predict.c.
Referenced by ix86_compute_frame_layout(), and ix86_expand_prologue().
Definition at line 278 of file predict.c.
Referenced by dead_or_predicable(), invert_jump(), and redirect_jump_2().
| static bool last_basic_block_p | ( | basic_block | bb | ) | [static] |
Definition at line 724 of file predict.c.
References EXIT_BLOCK_PTR.
Referenced by estimate_probability(), and tree_estimate_probability().
| bool maybe_hot_bb_p | ( | basic_block | bb | ) |
Definition at line 127 of file predict.c.
Referenced by build_tree_conflict_graph(), coalesce_asm_operands(), coalesce_phi_operands(), coalesce_result_decls(), coalesce_vars(), compute_alignments(), compute_function_frequency(), condjump_equiv_p(), copy_bb_p(), decide_peel_completely(), decide_unrolling_and_peeling(), dump_bb_info(), dump_flow_info(), ignore_bb_p(), ix86_pad_returns(), outgoing_edges_match(), rtl_value_profile_transformations(), tree_unroll_loops_completely(), tree_value_profile_transformations(), unswitch_single_loop(), and x86_machine_dependent_reorg().
| void note_prediction_to_br_prob | ( | ) |
Definition at line 867 of file predict.c.
References add_noreturn_fake_exit_edges(), calculate_dominance_info(), CDI_DOMINATORS, CDI_POST_DOMINATORS, connect_infinite_loops_to_exit(), ENTRY_BLOCK_PTR, FOR_EACH_BB, free(), free_dominance_info(), heads, last_basic_block, memset, post_dominators, process_note_predictions(), remove_fake_edges(), and xmalloc().
Referenced by rest_of_compilation().
| static bool last_basic_block_p PARAMS | ( | (basic_block) | ) | [static] |
| static void process_note_prediction PARAMS | ( | (basic_block, int *, dominance_info, dominance_info, int, int) | ) | [static] |
| static void process_note_predictions PARAMS | ( | (basic_block, int *, dominance_info, dominance_info) | ) | [static] |
Definition at line 77 of file cplus-dem.c.
| static void dump_prediction PARAMS | ( | (enum br_predictor, int, basic_block, int) | ) | [static] |
| static void combine_predictions_for_insn PARAMS | ( | (rtx, basic_block) | ) | [static] |
| static bool predicted_by_p PARAMS | ( | (basic_block, enum br_predictor) | ) | [static] |
| void predict_edge | ( | edge | e, | |
| enum br_predictor | predictor, | |||
| int | probability | |||
| ) |
Definition at line 226 of file predict.c.
Referenced by estimate_probability(), predict_edge_def(), and predict_loops().
| void predict_edge_def | ( | edge | e, | |
| enum br_predictor | predictor, | |||
| enum prediction | taken | |||
| ) |
Definition at line 261 of file predict.c.
Referenced by estimate_probability(), mf_build_check_statement_for(), predict_loops(), predict_paths_leading_to(), process_note_prediction(), tree_estimate_probability(), and tree_predict_by_opcode().
| void predict_insn | ( | rtx | insn, | |
| enum br_predictor | predictor, | |||
| int | probability | |||
| ) |
Definition at line 189 of file predict.c.
References abort, any_condjump_p(), flag_guess_branch_prob, GEN_INT, gen_rtx_CONCAT, gen_rtx_EXPR_LIST, REG_BR_PRED, and REG_NOTES.
Referenced by predict_edge(), predict_insn_def(), rtl_predict_edge(), strength_reduce(), and unroll_loop().
| void predict_insn_def | ( | rtx | insn, | |
| enum br_predictor | predictor, | |||
| enum prediction | taken | |||
| ) |
Definition at line 210 of file predict.c.
Referenced by bb_estimate_probability_locally(), duplicate_loop_exit_test(), estimate_probability(), expand_builtin_expect_jump(), expected_value_to_br_prob(), stack_protect_epilogue(), and unroll_loop().
| static bool predicted_by_p | ( | basic_block | bb, | |
| enum br_predictor | predictor | |||
| ) | [static] |
Definition at line 174 of file predict.c.
References INSN_P, INTVAL, REG_BR_PRED, REG_NOTE_KIND, REG_NOTES, and XEXP.
Referenced by estimate_probability(), predict_loops(), and tree_estimate_probability().
| bool probably_cold_bb_p | ( | basic_block | bb | ) |
| bool probably_never_executed_bb_p | ( | basic_block | bb | ) |
Definition at line 160 of file predict.c.
Referenced by bb_to_key(), compute_alignments(), compute_function_frequency(), dump_bb_info(), dump_flow_info(), find_rarely_executed_basic_blocks_and_crossing_edges(), and push_to_next_round_p().
| static void process_note_prediction | ( | basic_block | bb, | |
| int * | heads, | |||
| dominance_info | dominators, | |||
| dominance_info | post_dominators, | |||
| int | pred, | |||
| int | flags | |||
| ) | [static] |
Definition at line 743 of file predict.c.
References BASIC_BLOCK, can_predict_insn_p(), edge::dest, dominated_by_p(), end, ENTRY_BLOCK, ENTRY_BLOCK_PTR, get_immediate_dominator(), basic_block_def::index, IS_TAKEN, last_basic_block, predict_edge_def(), edge::succ_next, taken, and is::y.
Referenced by process_note_predictions().
| static void process_note_predictions | ( | basic_block | bb, | |
| int * | heads, | |||
| dominance_info | dominators, | |||
| dominance_info | post_dominators | |||
| ) | [static] |
Definition at line 805 of file predict.c.
References delete_insn(), EDGE_FAKE, find_reg_note(), edge::flags, GET_CODE, insn, int, NOT_TAKEN, NOTE_INSN_PREDICTION, NOTE_LINE_NUMBER, NOTE_PREDICTION_ALG, NOTE_PREDICTION_FLAGS, NULL, PREV_INSN, process_note_prediction(), REG_NORETURN, edge::succ, and edge::succ_next.
Referenced by note_prediction_to_br_prob().
Definition at line 932 of file predict.c.
References abort, BLOCK_INFO, count, edge::dest, double_type_node, EDGE_DFS_BACK, EDGE_INFO, edge::flags, FOR_EACH_BB, fprintf(), frequency, basic_block_def::index, last, memcpy, NULL, basic_block_def::pred, edge::pred_next, real_almost_one, REAL_ARITHMETIC, real_inv_br_prob_base, real_one, REAL_VALUE_FROM_INT, REAL_VALUE_TYPE, REAL_VALUES_IDENTICAL, REAL_VALUES_LESS, real_zero, rtl_dump_file, edge::src, basic_block_def::succ, edge::succ_next, tmp, and TYPE_MODE.
Referenced by estimate_loops_at_level().
struct predictor_info predictor_info[] [static] |
REAL_VALUE_TYPE real_almost_one [static] |
Definition at line 66 of file predict.c.
Referenced by estimate_bb_frequencies(), and propagate_freq().
REAL_VALUE_TYPE real_bb_freq_max [static] |
REAL_VALUE_TYPE real_br_prob_base [static] |
REAL_VALUE_TYPE real_inv_br_prob_base [static] |
Definition at line 66 of file predict.c.
Referenced by estimate_bb_frequencies(), and propagate_freq().
REAL_VALUE_TYPE real_one [static] |
Definition at line 66 of file predict.c.
Referenced by estimate_bb_frequencies(), and propagate_freq().
REAL_VALUE_TYPE real_one_half [static] |
REAL_VALUE_TYPE real_zero [static] |
Definition at line 66 of file predict.c.
Referenced by estimate_bb_frequencies(), and propagate_freq().
1.5.6