[PATCH][modulo-sched] Minor cosmetic change

Revital1 Eres ERES@il.ibm.com
Tue Sep 18 12:03:00 GMT 2007



gcc-patches-owner@gcc.gnu.org wrote on 17/09/2007 16:08:57:

> Revital1 Eres/Haifa/IBM wrote on 17/09/2007 10:05:32:
>
> > Hello,
> >
> > This patch contains a minor cosmetic change mentioned in -
> > http://gcc.gnu.org/ml/gcc-patches/2007-08/msg01800.html.
> >
> > Tested on ppc64 (only C due to recent failure with mainline on ppc).
> >
> > OK for mainline?
> >
>
> ok, with minor comment below.
> Ayal.

Here's the final version. OK to commit?

Revital

(See attached file: patch_sms_d.txt)
>
> > :ADDPATCH middle-end (modulo-sched):
>
> > Thanks,
> > Revital
> >
> > 2007-09-17  Ayal Zaks  <zaks@il.ibm.com>
> >             Revital Eres  <eres@il.ibm.com>
> >
> >         * modulo-sched.c (doloop_register_get): Rewrite the loop which
> >         checks whether the count_reg is found outside the control part.
> >
> > Index: modulo-sched.c
> > ===================================================================
> > --- modulo-sched.c      (revision 128513)
> > +++ modulo-sched.c      (working copy)
> > @@ -286,8 +286,7 @@
> >  doloop_register_get (rtx head ATTRIBUTE_UNUSED, rtx tail
> ATTRIBUTE_UNUSED)
> >  {
> >  #ifdef HAVE_doloop_end
> > -  rtx reg, condition, insn;
> > -  bool found = false;
> > +  rtx reg, condition, insn, first_insn_not_to_check;
> >
> >    if (!JUMP_P (tail))
> >      return NULL_RTX;
> > @@ -309,25 +308,18 @@
> >       until the decrement.  We assume the control part consists of
> >       either a single (parallel) branch-on-count or a (non-parallel)
> >       branch immediately preceded by a single (decrement) insn.  */
> > -  for (insn = head; insn != PREV_INSN (tail); insn = NEXT_INSN (insn))
> > -    if ((found = reg_mentioned_p (reg, insn)) == true)
> > -      break;
> > -  if (found)
> > -    {
> > -      if (dump_file)
> > -        fprintf (dump_file, "SMS count_reg found outside control\n");
> > +  first_insn_not_to_check = (GET_CODE (PATTERN (tail)) == PARALLEL ?
> tail
> > +                             : PREV_INSN (tail));
> >
> > -      return NULL_RTX;
> > -    }
> > -  /* One last check in case the do-loop pattern is parallel.  */
> > -  if (GET_CODE (PATTERN (tail)) == PARALLEL)
> > -    if (reg_mentioned_p (reg, PREV_INSN (tail)))
> > +  for (insn = head; insn != first_insn_not_to_check; insn = NEXT_INSN
> (insn))
> > +    if (reg_mentioned_p (reg, insn))
> >        {
> >          if (dump_file)
> >            fprintf (dump_file, "SMS count_reg found outside
control\n");
> >
>
> May as well dump the insn and the reg that it mentions.
>
> >          return NULL_RTX;
> >        }
> > +
> >    return reg;
> >  #else
> >    return NULL_RTX;
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_sms_d.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070918/5bfd57e6/attachment.txt>


More information about the Gcc-patches mailing list