aboutsummaryrefslogtreecommitdiff
path: root/gcc/unroll.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/unroll.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/unroll.c')
-rw-r--r--gcc/unroll.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 94c58cd..9a09f5d 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -167,6 +167,7 @@ enum unroll_types
#include "toplev.h"
#include "hard-reg-set.h"
#include "basic-block.h"
+#include "predict.h"
/* This controls which loops are unrolled, and by how much we unroll
them. */
@@ -962,6 +963,7 @@ unroll_loop (loop, insn_count, strength_reduce_p)
emit_cmp_and_jump_insns (initial_value, final_value,
neg_inc ? LE : GE,
NULL_RTX, mode, 0, 0, labels[1]);
+ predict_insn_def (get_last_insn (), PRED_LOOP_CONDITION, NOT_TAKEN);
JUMP_LABEL (get_last_insn ()) = labels[1];
LABEL_NUSES (labels[1])++;
}
@@ -1007,6 +1009,8 @@ unroll_loop (loop, insn_count, strength_reduce_p)
labels[i]);
JUMP_LABEL (get_last_insn ()) = labels[i];
LABEL_NUSES (labels[i])++;
+ predict_insn (get_last_insn (), PRED_LOOP_PRECONDITIONING,
+ REG_BR_PROB_BASE / (unroll_number - i));
}
/* If the increment is greater than one, then we need another branch,