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] Enabling Software Prefetching by Default at -O3


Am Donnerstag 24 Juni 2010, 23:18:28 schrieb Fang, Changpeng:
> Hi, 
> 
> Attached is the version of the patch that turns prefetching on at -O3 for AMD cpus
> only. As discussed elsewhere in this thread, we use tri-state for -fprefetch-loop-arrays.
> If this flag is not explicitly set,  (for -O3) we turn it on in gcc/config/i386/i386.c 
> (override_options).
> 
> Is this OK to commit now?

Looks good. As soon as this is committed, somebody  should commit the following fix
that makes fno-prefetch-loop-arrays work again on s390.

Andreas, Ulrich. Can you have a look and apply after Changpengs patch if ok.

2010-06-25  Christian Borntraeger  <borntraeger@de.ibm.com>
 
	* config/s390/s390.c (override_options): Adopt prefetching
        at -O3 to handle flag_prefetch_loop_arrays as a tristate.

Index: gcc/config/s390/s390.c
===================================================================
*** gcc/config/s390/s390.c.orig
--- gcc/config/s390/s390.c
*************** override_options (void)
*** 1675,1683 ****
      set_param_value ("simultaneous-prefetches", 6);
  
    /* This cannot reside in optimization_options since HAVE_prefetch
!      requires the arch flags to be evaluated already.  */
!   if (HAVE_prefetch && optimize >= 3)
!     flag_prefetch_loop_arrays = 1;
  }
  
  /* Map for smallest class containing reg regno.  */
--- 1675,1684 ----
      set_param_value ("simultaneous-prefetches", 6);
  
    /* This cannot reside in optimization_options since HAVE_prefetch
!      requires the arch flags to be evaluated already.  Since prefetching
!      is benefitial on s390, we enable it if available.  */
!   if (flag_prefetch_loop_arrays < 0 && HAVE_prefetch && optimize >= 3)
!       flag_prefetch_loop_arrays = 1;
  }
  
  /* Map for smallest class containing reg regno.  */

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