diff options
author | Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl> | 1998-10-05 22:48:22 +0200 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-10-05 14:48:22 -0600 |
commit | 877ca132eceb915544b53160017805975323b630 (patch) | |
tree | dfe263e0abd0272acb40201353b69514fb6fe8ce /gcc | |
parent | da5a44b36e490f7c25bf6782c01793b8381d147f (diff) | |
download | gcc-877ca132eceb915544b53160017805975323b630.zip gcc-877ca132eceb915544b53160017805975323b630.tar.gz gcc-877ca132eceb915544b53160017805975323b630.tar.bz2 |
loop.c (move_movables): Corrected threshold calculation for moved_once registers.
* loop.c (move_movables): Corrected threshold calculation for
moved_once registers.
From-SVN: r22847
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/loop.c | 12 |
2 files changed, 9 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f42f2f9..df60f90 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +1998-10-05 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl> + + * loop.c (move_movables): Corrected threshold calculation for + moved_once registers. + Mon Oct 5 21:18:45 1998 Bernd Schmidt <crux@Pool.Informatik.RWTH-Aachen.DE> * loop.c (combine_givs_p): Fix test for identical givs. @@ -1839,13 +1839,8 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs) if (loop_dump_stream) fprintf (loop_dump_stream, "savings %d ", savings); - if (moved_once[regno]) - { - insn_count *= 2; - - if (loop_dump_stream) - fprintf (loop_dump_stream, "halved since already moved "); - } + if (moved_once[regno] && loop_dump_stream) + fprintf (loop_dump_stream, "halved since already moved "); /* An insn MUST be moved if we already moved something else which is safe only if this one is moved too: that is, @@ -1862,7 +1857,8 @@ move_movables (movables, threshold, insn_count, loop_start, end, nregs) if (already_moved[regno] || flag_move_all_movables - || (threshold * savings * m->lifetime) >= insn_count + || (threshold * savings * m->lifetime) >= + (moved_once[regno] ? insn_count * 2 : insn_count) || (m->forces && m->forces->done && VARRAY_INT (n_times_used, m->forces->regno) == 1)) { |