aboutsummaryrefslogtreecommitdiff
path: root/gcc/predict.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-06-18 17:35:47 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2001-06-18 15:35:47 +0000
commit923cbdc322ee080c02b94a95eece0618a2a78b47 (patch)
tree0803743d2349ea46ce205c05df7cae76a3374b1f /gcc/predict.c
parent049d2def48689b21149b6a7ad19c865e1d393627 (diff)
downloadgcc-923cbdc322ee080c02b94a95eece0618a2a78b47.zip
gcc-923cbdc322ee080c02b94a95eece0618a2a78b47.tar.gz
gcc-923cbdc322ee080c02b94a95eece0618a2a78b47.tar.bz2
unroll.c: Include predict.h.
* unroll.c: Include predict.h. (unroll_loop): Drop prediction notes on preconditioning. * predict.def (PRED_LOOP_PRECONDITIONG, PRED_LOOP_CONDITION): New; add comments on the others. * Makefile.in: (unroll.o): Add dependancy on predict.h. * loop.c (strength_reduce): Fix branch prediction. * stmt.c (emit_case_nodes): Optimize test whether index is in given interval. * predict.c (estimate_probability): Do not bail out early when note is present. (combine_predictions_for_insn): Fix note removal code. From-SVN: r43441
Diffstat (limited to 'gcc/predict.c')
-rw-r--r--gcc/predict.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gcc/predict.c b/gcc/predict.c
index 21c7149..38818cb 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -208,7 +208,6 @@ combine_predictions_for_insn (insn, bb)
probability combination techniques. */
while (*pnote)
{
- rtx *next_pnote = &XEXP (*pnote, 1);
if (REG_NOTE_KIND (*pnote) == REG_BR_PRED)
{
int predictor = INTVAL (XEXP (XEXP (*pnote, 0), 0));
@@ -219,7 +218,8 @@ combine_predictions_for_insn (insn, bb)
best_probability = probability, best_predictor = predictor;
*pnote = XEXP (*pnote, 1);
}
- pnote = next_pnote;
+ else
+ pnote = &XEXP (*pnote, 1);
}
dump_prediction (PRED_FIRST_MATCH, best_probability, bb);
if (!prob_note)
@@ -313,9 +313,6 @@ estimate_probability (loops_info)
|| ! any_condjump_p (last_insn))
continue;
- if (find_reg_note (last_insn, REG_BR_PROB, 0))
- continue;
-
for (e = bb->succ; e; e = e->succ_next)
{
/* Predict edges to blocks that return immediately to be