aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernd Schmidt <bernd.schmidt@analog.com>2009-04-29 12:44:00 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2009-04-29 12:44:00 +0000
commitc5d9672394dcf9cb8314d1c1fa85dba05c9c1128 (patch)
tree7be99fab29deb7b16876cc0a6e4cec45bdb3a80c /gcc
parentbd0a4cabe3f07ec4751ac3cecd4e35bfa2ca0906 (diff)
downloadgcc-c5d9672394dcf9cb8314d1c1fa85dba05c9c1128.zip
gcc-c5d9672394dcf9cb8314d1c1fa85dba05c9c1128.tar.gz
gcc-c5d9672394dcf9cb8314d1c1fa85dba05c9c1128.tar.bz2
bfin.c (bfin_register_move_cost): Test for subsets of DREGS rather than comparing directly.
* config/bfin/bfin.c (bfin_register_move_cost): Test for subsets of DREGS rather than comparing directly. Remove code that tries to account for latencies. From-SVN: r146956
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/bfin/bfin.c10
2 files changed, 6 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 39214fb..883f1b8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -5,6 +5,10 @@
Remove special case testing for last insn of inner loops. Don't fail if
the loop ends with a jump, emit an extra nop instead.
+ * config/bfin/bfin.c (bfin_register_move_cost): Test for subsets of
+ DREGS rather than comparing directly. Remove code that tries to
+ account for latencies.
+
2009-04-29 Richard Guenther <rguenther@suse.de>
PR tree-optimization/39941
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 43682a3..6a77c57 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -2331,20 +2331,14 @@ bfin_register_move_cost (enum machine_mode mode,
enum reg_class class1, enum reg_class class2)
{
/* These need secondary reloads, so they're more expensive. */
- if ((class1 == CCREGS && class2 != DREGS)
- || (class1 != DREGS && class2 == CCREGS))
+ if ((class1 == CCREGS && !reg_class_subset_p (class2, DREGS))
+ || (class2 == CCREGS && !reg_class_subset_p (class1, DREGS)))
return 4;
/* If optimizing for size, always prefer reg-reg over reg-memory moves. */
if (optimize_size)
return 2;
- /* There are some stalls involved when moving from a DREG to a different
- class reg, and using the value in one of the following instructions.
- Attempt to model this by slightly discouraging such moves. */
- if (class1 == DREGS && class2 != DREGS)
- return 2 * 2;
-
if (GET_MODE_CLASS (mode) == MODE_INT)
{
/* Discourage trying to use the accumulators. */