aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikael Pettersson <mikpe@it.uu.se>2011-07-31 17:00:58 +0200
committerAndreas Schwab <schwab@gcc.gnu.org>2011-07-31 15:00:58 +0000
commit03e69b1217876cb8dac551b96b2bf05b9e04f9b6 (patch)
treef96ee3cfc342a8d31cb016c012fd9c8e0d87d099
parentdcaac07dbf07815294d7f8b1568ef9e157b57dae (diff)
downloadgcc-03e69b1217876cb8dac551b96b2bf05b9e04f9b6.zip
gcc-03e69b1217876cb8dac551b96b2bf05b9e04f9b6.tar.gz
gcc-03e69b1217876cb8dac551b96b2bf05b9e04f9b6.tar.bz2
Author: Mikael Pettersson <mikpe@it.uu.se>
PR target/47908 * gcc/config/m68k/m68k.c (m68k_override_options_after_change): New function. Disable instruction scheduling for non-ColdFire targets. (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define. From-SVN: r176975
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/m68k/m68k.c17
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c10b1e0..b637de2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2011-07-31 Mikael Pettersson <mikpe@it.uu.se>
+
+ PR target/47908
+ * config/m68k/m68k.c (m68k_override_options_after_change): New function.
+ Disable instruction scheduling for non-ColdFire targets.
+ (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
+
2011-07-31 Revital Eres <revital.eres@linaro.org>
* ddg.c (create_ddg_dep_from_intra_loop_link): Remove the creation
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index c0621c1..8b57d6c 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -136,6 +136,7 @@ static bool m68k_can_eliminate (const int, const int);
static void m68k_conditional_register_usage (void);
static bool m68k_legitimate_address_p (enum machine_mode, rtx, bool);
static void m68k_option_override (void);
+static void m68k_override_options_after_change (void);
static rtx find_addr_reg (rtx);
static const char *singlemove_string (rtx *);
static void m68k_output_mi_thunk (FILE *, tree, HOST_WIDE_INT,
@@ -235,6 +236,9 @@ static bool m68k_cannot_force_const_mem (enum machine_mode mode, rtx x);
#undef TARGET_OPTION_OVERRIDE
#define TARGET_OPTION_OVERRIDE m68k_option_override
+#undef TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE
+#define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE m68k_override_options_after_change
+
#undef TARGET_RTX_COSTS
#define TARGET_RTX_COSTS m68k_rtx_costs
@@ -634,6 +638,19 @@ m68k_option_override (void)
}
}
+/* Implement TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE. */
+
+static void
+m68k_override_options_after_change (void)
+{
+ if (m68k_sched_cpu == CPU_UNKNOWN)
+ {
+ flag_schedule_insns = 0;
+ flag_schedule_insns_after_reload = 0;
+ flag_modulo_sched = 0;
+ }
+}
+
/* Generate a macro of the form __mPREFIX_cpu_NAME, where PREFIX is the
given argument and NAME is the argument passed to -mcpu. Return NULL
if -mcpu was not passed. */