This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Loop unroll fixes


In article <5.1.0.14.2.20011004153251.054de990@mail.lauterbach.com> you write:
>Mark, Bernd, what about this for mainline and 3.0.2? Somehow the patch 
>never made it past an half-approved state. I stumbled over this while 
>tracking another (unfortunately unrelated, more info later today) loop bug.

This is partly my fault.  I was supposed to finish the patch review that
Bernd started.

There are three testcases for Zoltan's 3 patches.  Two of these testcases
are not regressions.  They fail at -O2 -funroll-loops in both gcc-2.95.2 and
gcc-3.0.1.  The bugs should be fixed in mainline of course, but I see no
critical need to include them in gcc 3.0.2.

The third one is a regression.  It fails at -O2 -funroll-loops in gcc-3.0.1,
but works with the same options in gcc-2.95.2.  This testcase is
void
do_loop(unsigned long c, char *m)
{
    unsigned long i = 0;

    do {
        m[i] = 0;
    } while (++i != c);
}
This one is fixed by the small doloop.c patch, which happens to be the one
patch that Bernd did review.  There is a rather nice review in
	http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00596.html
I agree with Bernd's analysis.  The submitted patch doesn't fix the underlying
problem, but it does have value since it optimizes away unnecessary code, and
this optimization helps workaround the underlying bug for some testcases.
As such, I think it has enough value, and is safe enough, to be included in
gcc-3.0.2.  I am willing to approve this patch for mainline and gcc-3.0.2.
This is the patch in
	http://gcc.gnu.org/ml/gcc-patches/2001-09/msg00554.html

I need to spend more time looking at the other two patches.  If we still
want these patches in gcc-3.0.2, then the review will take longer than if
putting them in mainline is OK, since I need to be more careful with patches
for gcc-3.0.2.

Jim

PS The testcase from Franz Sirl is a regressison at -O2, and hence is a
more important problem than any of the 3 testcases from Zoltan which all
require -O2 -funroll-loops to trigger.  However, the Zoltan patches are
already 3 months old, so I don't want to delay their review any longer.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]