[ARM] Turn on sched-pressure by default on the ARM architecture.

Message ID CACUk7=VxXw-RX0=7s8zPzCxJbteVQcy306_sZT+tWnK9-bpMyw@mail.gmail.com
State New
Headers show

Commit Message

Ramana Radhakrishnan July 17, 2012, 9:20 a.m.

After benchmarking on a number of cores and measuring good
improvements across the board on the Cortex-A9 ,  on some cores
(Cortex M) we saw no great improvements but no regressions either,  we
should just turn this on by default for the ARM port as in general it
appears to give us a good win. Theoretically there's no reason why
this will not benefit us by default on single issue machines as it
prevents the first sched pass from having excessive register pressure.

I have turned this on by default for O1_PLUS level of optimization so
that if someone uses -O1 -fschedule-insns they get the benefit of
having sched-pressure on by default.



2012-07-17  Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
	    Ulrich Weigand  <ulrich.weigand@linaro.org>

	* common/config/arm/arm-common.c (arm_option_optimization_table):
	Enable -fsched-pressure by default while optimizing.
	* config/arm/arm.c (arm_option_override): Use the alternate scheduler
	pressure algorithm by default.


Index: gcc/common/config/arm/arm-common.c
--- gcc/common/config/arm/arm-common.c	(revision 189562)
+++ gcc/common/config/arm/arm-common.c	(working copy)
@@ -35,6 +35,7 @@ 
     /* Enable section anchors by default at -O1 or higher.  */
     { OPT_LEVELS_1_PLUS, OPT_fsection_anchors, NULL, 1 },
     { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 },
+    { OPT_LEVELS_1_PLUS, OPT_fsched_pressure, NULL, 1 },
     { OPT_LEVELS_NONE, 0, NULL, 0 }
Index: gcc/config/arm/arm.c
--- gcc/config/arm/arm.c	(revision 189562)
+++ gcc/config/arm/arm.c	(working copy)
@@ -2009,6 +2009,11 @@ 
+  /* Use the alternative scheduling-pressure algorithm by default.  */
+  maybe_set_param_value (PARAM_SCHED_PRESSURE_ALGORITHM, 2,
+                         global_options.x_param_values,
+                         global_options_set.x_param_values);
   /* Register global variables with the garbage collector.  */
   arm_add_gc_roots ();