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]

[PATCH]: Disable scheduler extended regions by default.


Hi!

This is a patch to disable extended regions in the scheduler by default. This change was requested in http://gcc.gnu.org/ml/gcc/2006-05/msg00678.html thread of the gcc mailing list.

The only thing I'm not sure of is how to add makefile dependency for the ia64.c from params.h . Can anyone help me with this?


-- Maxim
2006-06-01  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	* params.def (PARAM_MAX_SCHED_EXTEND_REGIONS_ITERS): Change default
	value to 0.
	* doc/invoke.texi (max-sched-extend-regions-iters): Document.
	* config/ia64/ia64.c (params.h): New header.
	(ia64_optimization_options): New function to adjust parameters.
	* config/ia64/ia64-protos.h (ia64_optimization_options): New prototype.
	* config/ia64/ia64.h (OPTIMIZATION_OPTIONS): New macro.
--- doc/invoke.texi	(/gcc-local/trunk/gcc)	(revision 19932)
+++ doc/invoke.texi	(/gcc-local/mri-0/gcc)	(revision 19932)
@@ -6225,7 +6225,7 @@ for interblock speculative scheduling.  
 The maximum number of iterations through CFG to extend regions.
 0 - disable region extension,
 N - do at most N iterations.
-The default value is 2.
+The default value is 0.
 
 @item max-sched-insn-conflict-delay
 The maximum conflict delay for an insn to be considered for speculative motion.
--- config/ia64/ia64.c	(/gcc-local/trunk/gcc)	(revision 19932)
+++ config/ia64/ia64.c	(/gcc-local/mri-0/gcc)	(revision 19932)
@@ -54,6 +54,7 @@ Boston, MA 02110-1301, USA.  */
 #include "tree-gimple.h"
 #include "intl.h"
 #include "debug.h"
+#include "params.h"
 
 /* This is used for communication between ASM_OUTPUT_LABEL and
    ASM_OUTPUT_LABELREF.  */
@@ -9748,4 +9749,13 @@ ia64_invalid_binary_op (int op ATTRIBUTE
   return NULL;
 }
 
+/* Implement overriding of the optimization options.  */
+void
+ia64_optimization_options (int level ATTRIBUTE_UNUSED,
+                           int size ATTRIBUTE_UNUSED)
+{
+  /* Let the scheduler form additional regions.  */
+  set_param_value ("max-sched-extend-regions-iters", 2);
+}
+
 #include "gt-ia64.h"
--- config/ia64/ia64.h	(/gcc-local/trunk/gcc)	(revision 19932)
+++ config/ia64/ia64.h	(/gcc-local/mri-0/gcc)	(revision 19932)
@@ -2043,4 +2043,8 @@ struct machine_function GTY(())
 /* Switch on code for querying unit reservations.  */
 #define CPU_UNITS_QUERY 1
 
+/* Define this to change the optimizations performed by default.  */
+#define OPTIMIZATION_OPTIONS(LEVEL, SIZE) \
+  ia64_optimization_options ((LEVEL), (SIZE))
+
 /* End of ia64.h */
--- config/ia64/ia64-protos.h	(/gcc-local/trunk/gcc)	(revision 19932)
+++ config/ia64/ia64-protos.h	(/gcc-local/mri-0/gcc)	(revision 19932)
@@ -110,3 +110,5 @@ extern enum direction ia64_hpux_function
 extern void ia64_hpux_handle_builtin_pragma (struct cpp_reader *);
 extern void ia64_output_function_profiler (FILE *, int);
 extern void ia64_profile_hook (int);
+
+extern void ia64_optimization_options (int, int);
--- params.def	(/gcc-local/trunk/gcc)	(revision 19932)
+++ params.def	(/gcc-local/mri-0/gcc)	(revision 19932)
@@ -502,7 +502,7 @@ DEFPARAM(PARAM_MIN_SPEC_PROB,
 DEFPARAM(PARAM_MAX_SCHED_EXTEND_REGIONS_ITERS,
          "max-sched-extend-regions-iters",
          "The maximum number of iterations through CFG to extend regions",
-         2, 0, 0)
+         0, 0, 0)
 
 DEFPARAM(PARAM_MAX_SCHED_INSN_CONFLICT_DELAY,
          "max-sched-insn-conflict-delay",

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