aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2023-02-18 05:19:21 +0100
committerHans-Peter Nilsson <hp@bitrange.com>2023-05-04 02:43:26 +0200
commite88d9e826ee68219dd4dbb2c0d8bdaee0a864301 (patch)
treefd3fbdc01bec34568d95f392d9f4eec3079470f0 /gcc
parent9525daf0fbc5c836ee028f5b58612857de7da51d (diff)
downloadgcc-e88d9e826ee68219dd4dbb2c0d8bdaee0a864301.zip
gcc-e88d9e826ee68219dd4dbb2c0d8bdaee0a864301.tar.gz
gcc-e88d9e826ee68219dd4dbb2c0d8bdaee0a864301.tar.bz2
CRIS-LRA: Define TARGET_SPILL_CLASS
This has no effect on arith-rand-ll (which suffers badly from LRA) and marginal effects (0.01% improvement) on coremark, but the size of coremark shrinks by 0.2%. An earlier version was tested with a tree around 2023-03 which showed (marginally) that ALL_REGS is preferable to GENERAL_REGS. * config/cris/cris.cc (TARGET_SPILL_CLASS): Define to ALL_REGS.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/cris/cris.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/config/cris/cris.cc b/gcc/config/cris/cris.cc
index 3013e01..496a1a0 100644
--- a/gcc/config/cris/cris.cc
+++ b/gcc/config/cris/cris.cc
@@ -134,6 +134,7 @@ static void cris_init_libfuncs (void);
static unsigned int cris_postdbr_cmpelim (void);
static reg_class_t cris_preferred_reload_class (rtx, reg_class_t);
+static reg_class_t cris_spill_class (reg_class_t, machine_mode);
static int cris_register_move_cost (machine_mode, reg_class_t, reg_class_t);
static int cris_memory_move_cost (machine_mode, reg_class_t, bool);
@@ -221,6 +222,9 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_VERSION;
#undef TARGET_PREFERRED_RELOAD_CLASS
#define TARGET_PREFERRED_RELOAD_CLASS cris_preferred_reload_class
+#undef TARGET_SPILL_CLASS
+#define TARGET_SPILL_CLASS cris_spill_class
+
/* We don't define TARGET_FIXED_CONDITION_CODE_REGS, as at the time of
this writing, it has an effect only on pre-reload CSE and when
scheduling (and for "macro fusion" at that). Neither applies for
@@ -1681,6 +1685,14 @@ cris_preferred_reload_class (rtx x, reg_class_t rclass)
return rclass;
}
+/* Worker function for TARGET_SPILL_CLASS. */
+
+static reg_class_t
+cris_spill_class (reg_class_t /* orig_class */, machine_mode)
+{
+ return ALL_REGS;
+}
+
/* Worker function for TARGET_REGISTER_MOVE_COST. */
static int