aboutsummaryrefslogtreecommitdiff
path: root/gcc/predict.c
diff options
context:
space:
mode:
authorSteven Bosscher <stevenb.gcc@gmail.com>2006-03-12 22:58:22 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2006-03-12 22:58:22 +0000
commit3d47ea88f3b5a2458f499633f831c65179003f6e (patch)
treed2df1cff7b7b6d39cad373f658025e733516f5d3 /gcc/predict.c
parent189cd5056db36dc477e1673f75f2eccf3be4056b (diff)
downloadgcc-3d47ea88f3b5a2458f499633f831c65179003f6e.zip
gcc-3d47ea88f3b5a2458f499633f831c65179003f6e.tar.gz
gcc-3d47ea88f3b5a2458f499633f831c65179003f6e.tar.bz2
predict.c (estimate_probability): Remove.
* predict.c (estimate_probability): Remove. * profile.c (rest_of_handle_branch_prob, pass_branch_prob): Remove. * basic-block.h (estimate_probability): Remove prototype. * passes.c (finish_optimization_passes): Dump branch prediction or profiling heuristics to the .profile tree dump. (init_optimization_passes): Unqueue pass_branch_prob. * doc/invoke.texi (-fdump-rtl-bp): Remove. From-SVN: r111980
Diffstat (limited to 'gcc/predict.c')
-rw-r--r--gcc/predict.c79
1 files changed, 0 insertions, 79 deletions
diff --git a/gcc/predict.c b/gcc/predict.c
index c59e57b..dd0cdc1 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -826,85 +826,6 @@ bb_estimate_probability_locally (basic_block bb)
}
}
-/* Statically estimate the probability that a branch will be taken and produce
- estimated profile. When profile feedback is present never executed portions
- of function gets estimated. */
-
-void
-estimate_probability (struct loops *loops_info)
-{
- basic_block bb;
-
- connect_infinite_loops_to_exit ();
- calculate_dominance_info (CDI_DOMINATORS);
- calculate_dominance_info (CDI_POST_DOMINATORS);
-
- predict_loops (loops_info, true);
-
- iv_analysis_done ();
-
- /* Attempt to predict conditional jumps using a number of heuristics. */
- FOR_EACH_BB (bb)
- {
- rtx last_insn = BB_END (bb);
- edge e;
- edge_iterator ei;
-
- if (! can_predict_insn_p (last_insn))
- continue;
-
- FOR_EACH_EDGE (e, ei, bb->succs)
- {
- /* Predict early returns to be probable, as we've already taken
- care for error returns and other are often used for fast paths
- trought function. */
- if ((e->dest == EXIT_BLOCK_PTR
- || (single_succ_p (e->dest)
- && single_succ (e->dest) == EXIT_BLOCK_PTR))
- && !predicted_by_p (bb, PRED_NULL_RETURN)
- && !predicted_by_p (bb, PRED_CONST_RETURN)
- && !predicted_by_p (bb, PRED_NEGATIVE_RETURN)
- && !last_basic_block_p (e->dest))
- predict_edge_def (e, PRED_EARLY_RETURN, TAKEN);
-
- /* Look for block we are guarding (i.e. we dominate it,
- but it doesn't postdominate us). */
- if (e->dest != EXIT_BLOCK_PTR && e->dest != bb
- && dominated_by_p (CDI_DOMINATORS, e->dest, e->src)
- && !dominated_by_p (CDI_POST_DOMINATORS, e->src, e->dest))
- {
- rtx insn;
-
- /* The call heuristic claims that a guarded function call
- is improbable. This is because such calls are often used
- to signal exceptional situations such as printing error
- messages. */
- for (insn = BB_HEAD (e->dest); insn != NEXT_INSN (BB_END (e->dest));
- insn = NEXT_INSN (insn))
- if (CALL_P (insn)
- /* Constant and pure calls are hardly used to signalize
- something exceptional. */
- && ! CONST_OR_PURE_CALL_P (insn))
- {
- predict_edge_def (e, PRED_CALL, NOT_TAKEN);
- break;
- }
- }
- }
- bb_estimate_probability_locally (bb);
- }
-
- /* Attach the combined probability to each conditional jump. */
- FOR_EACH_BB (bb)
- combine_predictions_for_insn (BB_END (bb), bb);
-
- remove_fake_edges ();
- estimate_bb_frequencies (loops_info);
- free_dominance_info (CDI_POST_DOMINATORS);
- if (profile_status == PROFILE_ABSENT)
- profile_status = PROFILE_GUESSED;
-}
-
/* Set edge->probability for each successor edge of BB. */
void
guess_outgoing_edge_probabilities (basic_block bb)