[PATCH] Make SMS use doloop_condition_get
Steven Bosscher
stevenb@suse.de
Thu Jun 2 20:38:00 GMT 2005
On Thursday 02 June 2005 20:24, Eric Christopher wrote:
> On Wed, 2005-06-01 at 10:04 -0600, Roger Sayle wrote:
> > On Wed, 1 Jun 2005, Mostafa Hagog wrote:
> > > 2005-06-01 Steven Bosscher <stevenb@suse.de>
> > > Mostafa Hagog <mustafa@il.ibm.com>
> > >
> > > * cfgloop.h (doloop_condition_get): Make external.
> > > * loop-doloop.c (doloop_condition_get): Generalize to make it
> > > usable in modulo-sched.c.
> > > * modulo-sched.c (doloop_register_get): Use
> > > doloop_condition_get instead of duplicating it.
> >
> > This is OK for mainline, thanks.
>
> This patch breaks all targets that don't have HAVE_doloop_end defined.
> (mips being the one I noticed).
>
> Steven, can you fix this up? Thanks.
I guess something like this should help but I have nothing
to test on.
Gr.
Steven
Index: modulo-sched.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/modulo-sched.c,v
retrieving revision 1.32
diff -u -3 -p -r1.32 modulo-sched.c
--- modulo-sched.c 2 Jun 2005 10:19:12 -0000 1.32
+++ modulo-sched.c 2 Jun 2005 20:36:23 -0000
@@ -273,8 +273,9 @@ static struct sched_info sms_sched_info
or zero if it is not a decrement-and-branch insn. */
static rtx
-doloop_register_get (rtx insn)
+doloop_register_get (rtx insn ATTRIBUTE_UNUSED)
{
+#ifdef HAVE_doloop_end
rtx pattern, reg, condition;
if (! JUMP_P (insn))
@@ -294,6 +295,9 @@ doloop_register_get (rtx insn)
gcc_unreachable ();
return reg;
+#else
+ return NULL_RTX;
+#endif
}
/* Check if COUNT_REG is set to a constant in the PRE_HEADER block, so
More information about the Gcc-patches
mailing list