This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [RFC] Don't schedule prefetch INSNs



It will be worthwhile if the basic block is a loop body. It might make sense to prefetch something used in the next loop iteration. Actually that's what I am trying to do for memcpys.

in that case, the placement of the prefetch inside the loop body is more or less irrelevant, no?

In the example described in my other mail the prefetches would be completely useless when the get moved over the copy instruction like this:


loop over cache lines (x += cache_line_size, y += cache_line_size):
      copy cache line x to y
      read prefetch x + cache_line_size
      write prefetch y + cache_line_size

The prefetch of the cache lines for the next loop iteration would be too close to the memory access.

Bye,

-Andreas-


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