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]

[Committed] S/390: Override max-unrolled-insns default


Hi,

it turned out to be benefical to limit the maximum loop size in order
to keep the dynamic branch prediction doing its job properly.

Committed to mainline.

Bye,

-Andreas-

2009-07-24  Andreas Krebbel  <krebbel1@de.ibm.com>
	
	* config/s390/s390.c (override_options): Default
	max-unrolled-insns to 100 for z10 tuning.


Index: gcc/config/s390/s390.c
===================================================================
--- gcc/config/s390/s390.c.orig	2009-07-21 17:20:19.000000000 +0200
+++ gcc/config/s390/s390.c	2009-07-24 14:18:22.000000000 +0200
@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3.  
 #include "optabs.h"
 #include "gimple.h"
 #include "df.h"
+#include "params.h"
 
 
 /* Define the specific costs for a given cpu.  */
@@ -1627,6 +1628,10 @@ override_options (void)
   if (!(target_flags_explicit & MASK_LONG_DOUBLE_128))
     target_flags |= MASK_LONG_DOUBLE_128;
 #endif
+
+  if (s390_tune == PROCESSOR_2097_Z10
+      && !PARAM_SET_P (PARAM_MAX_UNROLLED_INSNS))
+    set_param_value ("max-unrolled-insns", 100);
 }
 
 /* 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]