[PATCH] Fix a bad regmove transformation - SPEC CPU2k 186.crafty regression on dataflow branch.

Seongbae Park seongbae.park@gmail.com
Thu Mar 22 09:41:00 GMT 2007


On 21 Mar 2007 18:50:29 -0700, Ian Lance Taylor <iant@google.com> wrote:
> "Seongbae Park" <seongbae.park@gmail.com> writes:
>
> > 2007-03-21  Seongbae Park <seongbae.park@gmail.com>
> >
> >         * regmove.c (regmove_optimize): Use REG_MENTIONED_P
> >         instead of REG_OVERLAP_MENTIONED_P for DST.
>
> Use lower-case for function names in the ChangeLog entry.
>
> > Index: gcc/regmove.c
> > ===================================================================
> > --- gcc/regmove.c     (revision 123123)
> > +++ gcc/regmove.c     (working copy)
> > @@ -1429,8 +1429,13 @@ regmove_optimize (rtx f, int nregs)
> >                     break;
> >                   }
> >
> > +               /* REG_OVERLAP_MENTIONED_P returns false
> > +                  if REG is written but not read by the rtx P.
> > +                  However, we want to check for any writes to DST
> > +                  because we're going to extend the live range of DST
> > +                  so that it lives over the insn P. */
> >                 if (reg_overlap_mentioned_p (src, PATTERN (p))
> > -                   || reg_overlap_mentioned_p (dst, PATTERN (p)))
> > +                   || reg_mentioned_p (dst, PATTERN (p)))
> >                   break;
>
> Use lower case for function names in the comment, too (arrgghh! so
> many inconsistencies!).
> Also, the comment describes why the change was made, which is not
> wholly helpful to somebody coming to this code fresh.  How about
> something along the lines of:
>
> /* We can't make this change if SRC is read or partially written in P,
>    since we are going to eliminate SRC.  We can't make this change if
>    DST is mentioned at all in P, since we are going to change its
>    value.  */
>
> OK with the comment change if testing passes.
>
> Thanks.
>
> Ian

As the bootstrap and regtest on x86-64 look clean,
I just commited the patch as revision 123124
with the suggested change.
Thanks !
-- 
#pragma ident "Seongbae Park, compiler, http://seongbae.blogspot.com"



More information about the Gcc-patches mailing list