Commit 91f4cfe3 by Zdenek Dvorak Committed by Zdenek Dvorak

cfgloopanal.c (num_loop_insns, [...]): Count only real insns.

	* cfgloopanal.c (num_loop_insns, average_num_loop_insns): Count only
	real insns.
	* loop-unroll.c (unroll_loop_runtime_iterations): Remove superfluous
	condition.

From-SVN: r66700
parent ac38d8da
2003-05-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
* cfgloopanal.c (num_loop_insns, average_num_loop_insns): Count only
real insns.
* loop-unroll.c (unroll_loop_runtime_iterations): Remove superfluous
condition.
2003-05-11 Neil Booth <neil@cat.daikokuya.co.uk> 2003-05-11 Neil Booth <neil@cat.daikokuya.co.uk>
* doc/cpp.texi: Fix typos. * doc/cpp.texi: Fix typos.
......
...@@ -1033,6 +1033,7 @@ num_loop_insns (loop) ...@@ -1033,6 +1033,7 @@ num_loop_insns (loop)
bb = bbs[i]; bb = bbs[i];
ninsns++; ninsns++;
for (insn = bb->head; insn != bb->end; insn = NEXT_INSN (insn)) for (insn = bb->head; insn != bb->end; insn = NEXT_INSN (insn))
if (INSN_P (insn))
ninsns++; ninsns++;
} }
free(bbs); free(bbs);
...@@ -1057,6 +1058,7 @@ average_num_loop_insns (loop) ...@@ -1057,6 +1058,7 @@ average_num_loop_insns (loop)
binsns = 1; binsns = 1;
for (insn = bb->head; insn != bb->end; insn = NEXT_INSN (insn)) for (insn = bb->head; insn != bb->end; insn = NEXT_INSN (insn))
if (INSN_P (insn))
binsns++; binsns++;
ratio = loop->header->frequency == 0 ratio = loop->header->frequency == 0
......
...@@ -878,8 +878,6 @@ unroll_loop_runtime_iterations (loops, loop) ...@@ -878,8 +878,6 @@ unroll_loop_runtime_iterations (loops, loop)
DLTHE_FLAG_UPDATE_FREQ)) DLTHE_FLAG_UPDATE_FREQ))
abort (); abort ();
if (i != n_peel)
{
/* Create item for switch. */ /* Create item for switch. */
j = n_peel - i - (extra_zero_check ? 0 : 1); j = n_peel - i - (extra_zero_check ? 0 : 1);
p = REG_BR_PROB_BASE / (i + 2); p = REG_BR_PROB_BASE / (i + 2);
...@@ -908,7 +906,6 @@ unroll_loop_runtime_iterations (loops, loop) ...@@ -908,7 +906,6 @@ unroll_loop_runtime_iterations (loops, loop)
swtch->succ->flags & EDGE_IRREDUCIBLE_LOOP); swtch->succ->flags & EDGE_IRREDUCIBLE_LOOP);
e->probability = p; e->probability = p;
} }
}
if (extra_zero_check) if (extra_zero_check)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment