aboutsummaryrefslogtreecommitdiff
path: root/gcc/predict.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-09-20 02:05:38 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2004-09-20 00:05:38 +0000
commit58016611d805e892fdfea26cec9eefdc70b025d8 (patch)
tree2f70e487a222169bdb3574db111b49895b9efdca /gcc/predict.c
parent5bd916325a042777aa2fc925818c6f514979505f (diff)
downloadgcc-58016611d805e892fdfea26cec9eefdc70b025d8.zip
gcc-58016611d805e892fdfea26cec9eefdc70b025d8.tar.gz
gcc-58016611d805e892fdfea26cec9eefdc70b025d8.tar.bz2
* predict.c (estimate_probability): Remove unnecesary code.
From-SVN: r87736
Diffstat (limited to 'gcc/predict.c')
-rw-r--r--gcc/predict.c32
1 files changed, 2 insertions, 30 deletions
diff --git a/gcc/predict.c b/gcc/predict.c
index 88de74b..d344907 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -852,37 +852,9 @@ estimate_probability (struct loops *loops_info)
/* Attach the combined probability to each conditional jump. */
FOR_EACH_BB (bb)
- if (JUMP_P (BB_END (bb))
- && any_condjump_p (BB_END (bb))
- && bb->succ->succ_next != NULL)
- combine_predictions_for_insn (BB_END (bb), bb);
+ combine_predictions_for_insn (BB_END (bb), bb);
- remove_fake_exit_edges ();
- /* Fill in the probability values in flowgraph based on the REG_BR_PROB
- notes. */
- FOR_EACH_BB (bb)
- {
- rtx last_insn = BB_END (bb);
-
- if (!can_predict_insn_p (last_insn))
- {
- /* We can predict only conditional jumps at the moment.
- Expect each edge to be equally probable.
- ?? In the future we want to make abnormal edges improbable. */
- int nedges = 0;
- edge e;
-
- for (e = bb->succ; e; e = e->succ_next)
- {
- nedges++;
- if (e->probability != 0)
- break;
- }
- if (!e)
- for (e = bb->succ; e; e = e->succ_next)
- e->probability = (REG_BR_PROB_BASE + nedges / 2) / nedges;
- }
- }
+ remove_fake_edges ();
estimate_bb_frequencies (loops_info);
free_dominance_info (CDI_POST_DOMINATORS);
if (profile_status == PROFILE_ABSENT)