public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-466] CRIS-LRA: Define TARGET_SPILL_CLASS
@ 2023-05-04 0:43 Hans-Peter Nilsson
0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2023-05-04 0:43 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:e88d9e826ee68219dd4dbb2c0d8bdaee0a864301
commit r14-466-ge88d9e826ee68219dd4dbb2c0d8bdaee0a864301
Author: Hans-Peter Nilsson <hp@axis.com>
Date: Sat Feb 18 05:19:21 2023 +0100
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.
Diff:
---
gcc/config/cris/cris.cc | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gcc/config/cris/cris.cc b/gcc/config/cris/cris.cc
index 3013e01f22a..496a1a0fe91 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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-04 0:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-04 0:43 [gcc r14-466] CRIS-LRA: Define TARGET_SPILL_CLASS Hans-Peter Nilsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).