Array prefetch patch
Jan Hubicka
jh@suse.cz
Tue Dec 11 08:52:00 GMT 2001
> On Tue, Dec 11, 2001 at 09:54:59AM +0100, Jan Hubicka wrote:
> > > I've been playing with Honza's prefetch optimization patch, too, and
> > > have some changes to the one he just sent in:
> > >
> [snip]
> > >
> > > Use of the function remove_constant_addition causes a failure in the
> > > test gcc.c-torture/execute/920501-6.c when it is compiled with
> > > "-O3 -fprefetch-loop-arrays". With the call to it commented out it's
> > > OK. I can look into it further, since this is undoubtedly supposed
> > > to be doing something useful.
> > Interesting, I went trought testsuite with -fprefetch-loop-arrays and it
> > did work for me. What kind of failure you get?
>
> This test case, based on code in 920501-6.c, uses the wrong address for
> str when compiled with "-O2 -fprefetch-loop-arrays" if I don't remove
> the call to remove_constant_addition:
Thanks, I will try that.
> > >
> > > There are some "???" strings where I find things confusing.
> >
> > I will clarify/fix these and send updated patch after finishing the
> > -march/-mcpu tweeks we need for prefetch support on x86. Thanks!
>
> Great, thank you!
I am just testing the patch. I will fix the failure as well.
>
> If it doesn't work to have separate -march/-mcpu names for each kind of
> x86 processor then documenting the combination of options needed to
> support each processor might be a valid alternative. I just heard that
> prefetch on early versions of Athlon corrupts the cache, so perhaps the
> user does need some control.
He still do have the explicit flag to enable/disable the code generation.
I've never heart about that problem and kernel AFAIK do use prefetches.
>
> Janis
>
> P.S. Bootstrap (with -fprefetch-loop-arrays) and testing on ia64-linux
> went fine.
More information about the Gcc-patches
mailing list