This is the mail archive of the
mailing list for the GCC project.
Re: Patch to Avoid Bad Prefetching
> An estimate of 10 iterations can lead to a serious degradation in
> performance if the actual trip count turns out to be less than 10 and
> less than the ahead distance.
so just require that the number of iterations is at least 3*ahead (I
think prefetching would not be useful for such loops with just a few
iterations, anyway), or possibly disable the prefetching completely if
we do not have a reasonable estimate (i.e., if
> However, the user can always override that conservative estimate by
> setting the prefetch-unknown-trip-count parameter that I am proposing.
> It seems to me that setting this parameter provides the programmer with
> an easy way to give a hint about the trip count if he wants.
I think programmers are even less likely to play with the hundreds
of options gcc provides than to use profile feedback,