summaryrefslogtreecommitdiff
path: root/gcc/loop-unroll.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-11 22:54:33 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-11 22:54:33 +0000
commitc87a3eff0e1eee52bee707d52bc51b6184da93e2 (patch)
treecada37c3708d1388d2a80d6f7cbd1591975d8a65 /gcc/loop-unroll.c
parentedb52e01a457a73cebcb940d2f8566099074d1d8 (diff)
downloadgcc-c87a3eff0e1eee52bee707d52bc51b6184da93e2.tar.gz
* cfgloopanal.c (num_loop_insns, average_num_loop_insns): Count only
real insns. * loop-unroll.c (unroll_loop_runtime_iterations): Remove superfluous condition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66700 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop-unroll.c')
-rw-r--r--gcc/loop-unroll.c55
1 files changed, 26 insertions, 29 deletions
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index efecd4d27d4..e8509de774f 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -878,36 +878,33 @@ unroll_loop_runtime_iterations (loops, loop)
DLTHE_FLAG_UPDATE_FREQ))
abort ();
- if (i != n_peel)
- {
- /* Create item for switch. */
- j = n_peel - i - (extra_zero_check ? 0 : 1);
- p = REG_BR_PROB_BASE / (i + 2);
-
- preheader = loop_split_edge_with (loop_preheader_edge (loop),
- NULL_RTX, loops);
- label = block_label (preheader);
- start_sequence ();
- do_compare_rtx_and_jump (copy_rtx (niter), GEN_INT (j), EQ, 0,
- GET_MODE (desc->var), NULL_RTX, NULL_RTX,
- label);
- jump = get_last_insn ();
- JUMP_LABEL (jump) = label;
- REG_NOTES (jump)
- = gen_rtx_EXPR_LIST (REG_BR_PROB,
- GEN_INT (p), REG_NOTES (jump));
+ /* Create item for switch. */
+ j = n_peel - i - (extra_zero_check ? 0 : 1);
+ p = REG_BR_PROB_BASE / (i + 2);
+
+ preheader = loop_split_edge_with (loop_preheader_edge (loop),
+ NULL_RTX, loops);
+ label = block_label (preheader);
+ start_sequence ();
+ do_compare_rtx_and_jump (copy_rtx (niter), GEN_INT (j), EQ, 0,
+ GET_MODE (desc->var), NULL_RTX, NULL_RTX,
+ label);
+ jump = get_last_insn ();
+ JUMP_LABEL (jump) = label;
+ REG_NOTES (jump)
+ = gen_rtx_EXPR_LIST (REG_BR_PROB,
+ GEN_INT (p), REG_NOTES (jump));
- LABEL_NUSES (label)++;
- branch_code = get_insns ();
- end_sequence ();
-
- swtch = loop_split_edge_with (swtch->pred, branch_code, loops);
- set_immediate_dominator (loops->cfg.dom, preheader, swtch);
- swtch->succ->probability = REG_BR_PROB_BASE - p;
- e = make_edge (swtch, preheader,
- swtch->succ->flags & EDGE_IRREDUCIBLE_LOOP);
- e->probability = p;
- }
+ LABEL_NUSES (label)++;
+ branch_code = get_insns ();
+ end_sequence ();
+
+ swtch = loop_split_edge_with (swtch->pred, branch_code, loops);
+ set_immediate_dominator (loops->cfg.dom, preheader, swtch);
+ swtch->succ->probability = REG_BR_PROB_BASE - p;
+ e = make_edge (swtch, preheader,
+ swtch->succ->flags & EDGE_IRREDUCIBLE_LOOP);
+ e->probability = p;
}
if (extra_zero_check)