diff options
author | Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> | 2003-05-12 00:54:33 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2003-05-11 22:54:33 +0000 |
commit | 91f4cfe34425362425867d896bcb831df6926580 (patch) | |
tree | cada37c3708d1388d2a80d6f7cbd1591975d8a65 /gcc/cfgloopanal.c | |
parent | ac38d8da36c73f77adf130019fa0c247fdca64a1 (diff) | |
download | gcc-91f4cfe34425362425867d896bcb831df6926580.zip gcc-91f4cfe34425362425867d896bcb831df6926580.tar.gz gcc-91f4cfe34425362425867d896bcb831df6926580.tar.bz2 |
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
Diffstat (limited to 'gcc/cfgloopanal.c')
-rw-r--r-- | gcc/cfgloopanal.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cfgloopanal.c b/gcc/cfgloopanal.c index 0843a00..c3ef5a3 100644 --- a/gcc/cfgloopanal.c +++ b/gcc/cfgloopanal.c @@ -1033,7 +1033,8 @@ num_loop_insns (loop) bb = bbs[i]; ninsns++; for (insn = bb->head; insn != bb->end; insn = NEXT_INSN (insn)) - ninsns++; + if (INSN_P (insn)) + ninsns++; } free(bbs); @@ -1057,7 +1058,8 @@ average_num_loop_insns (loop) binsns = 1; for (insn = bb->head; insn != bb->end; insn = NEXT_INSN (insn)) - binsns++; + if (INSN_P (insn)) + binsns++; ratio = loop->header->frequency == 0 ? BB_FREQ_MAX |