FRV cleanup (remove frv_option_optimization)

Message ID
State New
Headers show

Commit Message

Joseph Myers Oct. 15, 2010, 12:23 a.m.
The FRV port of GCC contains some code in frv_option_optimization that
appears to have no actual use in the FSF GCC sources.

The function sets flag_rcsp if ENABLE_RCSP is defined.  There is
nothing that defines that macro, or that variable.  A macro
RCSP_SOFTWARE_PIPELINING is defined in frv.h, but is also unused.  So
these are removed by this patch.

The function also clears flag_schedule_insns_after_reload if
DISABLE_SCHED2 is defined.  But nothing ever defines DISABLE_SCHED2.
So this patch also removes that code.

With both of these dead, the function actually does nothing at all.
So this patch completely removes the hook from this port.

Tested by building cc1 for a cross to frv-elf.  OK to commit?

(Given this code it seems quite plausible this port could have other
dead macro definitions or tests, but I haven't checked for them.)

2010-10-14  Joseph Myers  <>

	* config/frv/frv.c (frv_option_optimization,
	* config/frv/frv.h (RCSP_SOFTWARE_PIPELINING): Remove.


Nick Clifton Oct. 15, 2010, 8:01 a.m. | #1
Hi Joseph,

> 2010-10-14  Joseph Myers<>
> 	* config/frv/frv.c (frv_option_optimization,
> 	* config/frv/frv.h (RCSP_SOFTWARE_PIPELINING): Remove.

Approved - please apply.



Index: gcc/config/frv/frv.h
--- gcc/config/frv/frv.h	(revision 165460)
+++ gcc/config/frv/frv.h	(working copy)
@@ -2460,11 +2460,6 @@  frv_ifcvt_modify_multiple_tests (CE_INFO
 /* If the following macro is defined and nonzero and deterministic
-   finite state automata are used for pipeline hazard recognition, the
-   code making resource-constrained software pipelining is on.  */
-/* If the following macro is defined and nonzero and deterministic
    finite state automata are used for pipeline hazard recognition, we
    will try to exchange insns in queue ready to improve the schedule.
    The more macro value, the more tries will be made.  */
Index: gcc/config/frv/frv.c
--- gcc/config/frv/frv.c	(revision 165460)
+++ gcc/config/frv/frv.c	(working copy)
@@ -265,7 +265,6 @@  frv_cpu_t frv_cpu_type = CPU_TYPE;	/* va
 static bool frv_handle_option			(size_t, const char *, int);
 static void frv_option_override			(void);
-static void frv_option_optimization		(int, int);
 static bool frv_legitimate_address_p		(enum machine_mode, rtx, bool);
 static int frv_default_flags_for_cpu		(void);
 static int frv_string_begins_with		(const_tree, const char *);
@@ -432,8 +431,6 @@  static bool frv_class_likely_spilled_p 	
 #define TARGET_HANDLE_OPTION frv_handle_option
 #define TARGET_OPTION_OVERRIDE frv_option_override
-#define TARGET_OPTION_OPTIMIZATION frv_option_optimization
 #define TARGET_INIT_BUILTINS frv_init_builtins
@@ -847,25 +844,6 @@  frv_option_override (void)
-   On the FRV, possibly disable VLIW packing which is done by the 2nd
-   scheduling pass at the current time.  */
-static void
-frv_option_optimization (int level, int size ATTRIBUTE_UNUSED)
-  if (level >= 2)
-    {
-      flag_schedule_insns_after_reload = 0;
-      flag_rcsp = 1;
-    }
 /* Return true if NAME (a STRING_CST node) begins with PREFIX.  */
 static int