diff options
author | Jan Hubicka <jh@suse.cz> | 2005-06-06 14:31:35 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2005-06-06 12:31:35 +0000 |
commit | a00d11f077e0577ef4c8f6d08f2c8d52d8ec15ca (patch) | |
tree | b33345b9d09639a34fdfad1df1f1c467319d43a7 /gcc/predict.c | |
parent | bbf59fad2d3953258c0a0c13516f8850b9e26c99 (diff) | |
download | gcc-a00d11f077e0577ef4c8f6d08f2c8d52d8ec15ca.zip gcc-a00d11f077e0577ef4c8f6d08f2c8d52d8ec15ca.tar.gz gcc-a00d11f077e0577ef4c8f6d08f2c8d52d8ec15ca.tar.bz2 |
predict.c (tree_predict_edge): Don't drop useless predictions; check that it is not called too late in the game.
* predict.c (tree_predict_edge): Don't drop useless predictions;
check that it is not called too late in the game.
(gate_estimate_probability): New gate.
(pass_profile): Gate.
* tree-mudflap.c (mf_build_check_statement_for): Do not drop
predictions; update CFG instead.
* cfgrtl.c (rtl_verify_flow_info): Check that predcitions are consumed.
From-SVN: r100662
Diffstat (limited to 'gcc/predict.c')
-rw-r--r-- | gcc/predict.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/predict.c b/gcc/predict.c index 22468ac..61cc540 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -231,8 +231,9 @@ rtl_predict_edge (edge e, enum br_predictor predictor, int probability) void tree_predict_edge (edge e, enum br_predictor predictor, int probability) { + gcc_assert (profile_status != PROFILE_GUESSED); if ((e->src != ENTRY_BLOCK_PTR && EDGE_COUNT (e->src->succs) > 1) - && flag_guess_branch_prob) + && flag_guess_branch_prob && optimize) { struct edge_prediction *i = ggc_alloc (sizeof (struct edge_prediction)); @@ -1926,11 +1927,16 @@ choose_function_section (void) UNLIKELY_EXECUTED_TEXT_SECTION_NAME); } +static bool +gate_estimate_probability (void) +{ + return flag_guess_branch_prob; +} struct tree_opt_pass pass_profile = { "profile", /* name */ - NULL, /* gate */ + gate_estimate_probability, /* gate */ tree_estimate_probability, /* execute */ NULL, /* sub */ NULL, /* next */ |