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: ping patches


Hello,

> * NOPREFETCH_RANGE_{MIN,MAX} must be moved in to the target structure.  
> Some back ends may want to set these based on command-line options, etc.

which they may do as well by redefining the macros (similarly as it is
done with all remaining prefetch optimization controlling values in
loop.c).

> * There are comments about transform 5 -- but no documentation thereof.

You probably overlooked this chunk in the patch:

*************** find_values_to_profile (unsigned *n_valu
*** 294,299 ****
--- 418,440 ----
     It would be possible to continue analogically for K * b for other small
     K's, but it is probably not useful.
  
+    5)
+ 
+    Read or write of mem[address], where the value of address changes usually
+    by a constant C != 0 between the following accesses to the computation; with
+    -fspeculative-prefetching we then add a prefetch of address + C before
+    the insn.  This handles prefetching of several interesting cases in addition
+    to a simple prefetching for addresses that are induction variables, e. g.
+    linked lists allocated sequentially (even in case they are processed
+    recursively).
+ 
+    TODO -- we should also check whether there is not (usually) a small
+ 	   difference with the adjacent memory references, so that we do
+ 	   not issue overlapping prefetches.  Also we should employ some
+ 	   heuristics to eliminate cases where prefetching evidently spoils
+ 	   the code.
+ 	-- it should somehow cooperate with the loop optimizer prefetching
+ 
     TODO:
  
     There are other useful cases that could be handled by a similar mechanism,

Zdenek


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