aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@cygnus.co.uk>1998-08-27 08:39:22 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>1998-08-27 09:39:22 +0100
commit7a5109b7f31c875043347be6b894063d1037dd27 (patch)
tree990ed3b17f31c479b0ce1493dc01fbaa19a2fdaa /gcc
parent8c1bd4f5dc5d8b43e70d75f5c4ae0ce715c6ebb8 (diff)
downloadgcc-7a5109b7f31c875043347be6b894063d1037dd27.zip
gcc-7a5109b7f31c875043347be6b894063d1037dd27.tar.gz
gcc-7a5109b7f31c875043347be6b894063d1037dd27.tar.bz2
loop.c (check_dbra_loop): Enable code for reversal of some loops without a known constant loop end.
* loop.c (check_dbra_loop): Enable code for reversal of some loops without a known constant loop end. From-SVN: r22019
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/loop.c9
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index aef593f..e4db16f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Thu Aug 27 16:34:51 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * loop.c (check_dbra_loop): Enable code for reversal
+ of some loops without a known constant loop end.
+
Wed Aug 26 18:38:15 1998 Richard Henderson <rth@cygnus.com>
* haifa-sched.c (last_clock_var): New.
diff --git a/gcc/loop.c b/gcc/loop.c
index a34106d..f11caeb 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -6931,7 +6931,6 @@ check_dbra_loop (loop_end, insn_count, loop_start)
initial_value = const0_rtx;
}
-#if 0
/* Check if there is a NOTE_INSN_LOOP_VTOP note. If there is,
that means that this is a for or while style loop, with
a loop exit test at the start. Thus, we can assume that
@@ -6944,12 +6943,12 @@ check_dbra_loop (loop_end, insn_count, loop_start)
vtop = loop_end;
do
vtop = PREV_INSN (vtop);
- while (GET_CODE (vtop) != NOTE);
+ while (GET_CODE (vtop) != NOTE
+ || NOTE_LINE_NUMBER (vtop) > 0
+ || NOTE_LINE_NUMBER (vtop) == NOTE_REPEATED_LINE_NUMBER
+ || NOTE_LINE_NUMBER (vtop) == NOTE_INSN_DELETED);
if (NOTE_LINE_NUMBER (vtop) != NOTE_INSN_LOOP_VTOP)
vtop = NULL_RTX;
-#else
- vtop = NULL_RTX;
-#endif
/* First check if we can do a vanilla loop reversal. */
if (initial_value == const0_rtx