aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2020-01-23 20:24:36 +0100
committerHans-Peter Nilsson <hp@axis.com>2020-05-09 03:39:35 +0200
commita792c62c17aed562f415771b0f89b399470b4fee (patch)
treed2bc35f5d2faefe3986109b758e172e9373fa9f9
parent27228024598c3515389cdb378346433fb2c48551 (diff)
downloadgcc-a792c62c17aed562f415771b0f89b399470b4fee.zip
gcc-a792c62c17aed562f415771b0f89b399470b4fee.tar.gz
gcc-a792c62c17aed562f415771b0f89b399470b4fee.tar.bz2
cris: Define TARGET_FLAGS_REGNUM.
This made a whole lot of difference regarding regressions in the delay-slot filling. Before this, comparing __lshrdi3 for v10 before/after decc0ration and other nearby functions was worse by several missing delay-slot fills; now down to 1. Also, add a comment about *not* defining TARGET_FIXED_CONDITION_CODE_REGS. gcc: * config/cris/cris.c (TARGET_FLAGS_REGNUM): Define.
-rw-r--r--gcc/ChangeLog2
-rw-r--r--gcc/config/cris/cris.c10
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 915a007..3928ee7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -38,6 +38,8 @@
* config/cris/cris.md (zcond): New code_iterator.
("*cbranch<mode>4_btstq<CC>"): New insn_and_split.
+ * config/cris/cris.c (TARGET_FLAGS_REGNUM): Define.
+
2020-05-08 Vladimir Makarov <vmakarov@redhat.com>
* ira-color.c (update_costs_from_allocno): Remove
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index 9fdabe2..eecda83 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -219,6 +219,16 @@ int cris_cpu_version = CRIS_DEFAULT_CPU_VERSION;
#undef TARGET_PREFERRED_RELOAD_CLASS
#define TARGET_PREFERRED_RELOAD_CLASS cris_preferred_reload_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
+ CRIS so don't waste compilation cycles on enabling a pass that does
+ nothing. Beware of changes to its usage; it may make sense to enable
+ "later". */
+
+#undef TARGET_FLAGS_REGNUM
+#define TARGET_FLAGS_REGNUM CRIS_CC0_REGNUM
+
#undef TARGET_REGISTER_MOVE_COST
#define TARGET_REGISTER_MOVE_COST cris_register_move_cost
#undef TARGET_MEMORY_MOVE_COST