diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-23 00:50:37 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-23 00:50:37 +0000 |
commit | d8c70625ae072fce9cd64ee06c8a3b91bc554057 (patch) | |
tree | b424c4477beb895f8bc28d96a8c822154f4b71bc /gcc/predict.c | |
parent | b6d23d1ade75a0eeb78464bf2ed4795efcf8f2b3 (diff) | |
download | gcc-d8c70625ae072fce9cd64ee06c8a3b91bc554057.tar.gz |
* cfgexpand.c (add_reg_br_prob_note): New function.
(expand_gimple_cond_expr): Use it.
(tree_expand_cfg): No longer kill the profile.
* cfgrt.c (rtl_verify_flow_info_1): Check profile consistency
only if it is present.
* passes.c (rest_of_handle_loop_optimize): Kill the profile.
* predict.c (combine_predictions_for_insn): Set the probabilities
based on REG_BR_PROB note if present.
* predict.c (branch_prob): Profile is read only with
flag_branch_probabilities.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87910 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/predict.c')
-rw-r--r-- | gcc/predict.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/predict.c b/gcc/predict.c index 7eaee34d2eb..cc314ecad74 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -438,6 +438,15 @@ combine_predictions_for_insn (rtx insn, basic_block bb) = REG_BR_PROB_BASE - combined_probability; } } + else if (bb->succ->succ_next) + { + int prob = INTVAL (XEXP (prob_note, 0)); + + BRANCH_EDGE (bb)->probability = prob; + FALLTHRU_EDGE (bb)->probability = REG_BR_PROB_BASE - prob; + } + else + bb->succ->probability = REG_BR_PROB_BASE; } /* Combine predictions into single probability and store them into CFG. |