diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-03 07:56:47 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-03 07:56:47 +0000 |
commit | 893ff8a65523c6adea2b17da408022468e8ad310 (patch) | |
tree | 20695b9c1c06a51bef949e2e27c2c1bc4213eb58 /gcc/loop.c | |
parent | a3c7ab5f81b934c822b7f759745936b6fc617786 (diff) | |
download | gcc-893ff8a65523c6adea2b17da408022468e8ad310.tar.gz |
PR opt/4311
* loop.h (LOOP_FIRST_PASS): New.
* loop.c (strength_reduce): Mind it when deciding to unroll.
* toplev.c (rest_of_compilation): Set it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@51798 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop.c')
-rw-r--r-- | gcc/loop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/loop.c b/gcc/loop.c index 99281d0dba4..b51b2a850d7 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -5214,7 +5214,8 @@ strength_reduce (loop, flags) collected. Always unroll loops that would be as small or smaller unrolled than when rolled. */ if ((flags & LOOP_UNROLL) - || (loop_info->n_iterations > 0 + || (!(flags & LOOP_FIRST_PASS) + && loop_info->n_iterations > 0 && unrolled_insn_copies <= insn_count)) unroll_loop (loop, insn_count, 1); |