This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] loop.c
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 14 May 2003 16:06:50 +0100
- Subject: [PATCH] loop.c
- Organization: Codesourcery LLC
Hi,
I've installed this obvious patch that factors out a common test.
booted & tested on i686-pc-linux-gnu
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
2003-05-14 Nathan Sidwell <nathan@codesourcery.com>
* loop.c (check_dbra_loop): Factor common test.
Index: loop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/loop.c,v
retrieving revision 1.454
diff -c -3 -p -r1.454 loop.c
*** loop.c 3 May 2003 14:25:21 -0000 1.454
--- loop.c 14 May 2003 08:36:48 -0000
*************** check_dbra_loop (loop, insn_count)
*** 8274,8282 ****
&& REGNO (SET_DEST (set)) == bl->regno)
/* An insn that sets the biv is okay. */
;
! else if ((p == prev_nonnote_insn (prev_nonnote_insn (loop_end))
! || p == prev_nonnote_insn (loop_end))
! && reg_mentioned_p (bivreg, PATTERN (p)))
{
/* If either of these insns uses the biv and sets a pseudo
that has more than one usage, then the biv has uses
--- 8274,8284 ----
&& REGNO (SET_DEST (set)) == bl->regno)
/* An insn that sets the biv is okay. */
;
! else if (!reg_mentioned_p (bivreg, PATTERN (p)))
! /* An insn that doesn't mention the biv is okay. */
! ;
! else if (p == prev_nonnote_insn (prev_nonnote_insn (loop_end))
! || p == prev_nonnote_insn (loop_end))
{
/* If either of these insns uses the biv and sets a pseudo
that has more than one usage, then the biv has uses
*************** check_dbra_loop (loop, insn_count)
*** 8290,8296 ****
break;
}
}
! else if (reg_mentioned_p (bivreg, PATTERN (p)))
{
no_use_except_counting = 0;
break;
--- 8292,8298 ----
break;
}
}
! else
{
no_use_except_counting = 0;
break;