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: [patch] Removal of redundant prefetches during loop unrolling



On Jan 20, 2006, at 4:36 PM, Zdenek Dvorak wrote:

The patch was bootstrapped (with -march=athlon -fprefetch-loop-arrays -funroll-loops)
and regtested on i686.


Zdenek

* loop-unroll.c (PREFETCH_BLOCK): New macro.
Index: loop-unroll.c
===================================================================
*** loop-unroll.c (revision 110005)
--- loop-unroll.c (working copy)
*************** Software Foundation, 51 Franklin Street,
*** 69,74 ****
--- 69,80 ----
showed that this choice may affect performance in order of several %.
*/


+ /* Provide a default value for prefetch block size, in case md does not. */
+
+ #ifndef PREFETCH_BLOCK
+ #define PREFETCH_BLOCK 32
+ #endif
+
/* Information about induction variables to split. */


struct iv_to_split

Can you please add this to defaults.h instead as it now used by both loop.c and loop-unroll.c (yes I know that loop.c is being removed but it is still better in one place).

Also this define is not documented already in tm.texi even though it can be
overridden by the targets. It would also be best if you documented it.


Also can you comment on what happens with tree complete unrolling and
someone having a __buitin_prefetch there?

Thanks,
Andrew Pinski


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