aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAnatoly Sokolov <aesok@post.ru>2011-12-24 01:40:42 +0400
committerAnatoly Sokolov <aesok@gcc.gnu.org>2011-12-24 01:40:42 +0400
commit4f9664f71a5fceee103a188fd2cd8b70e1d6e584 (patch)
tree53c9ff900b40d8eb643b4ebfcd7675b2e4e181df /gcc
parent54eca047c7524a9cb61fe97c21b1d2157223b54a (diff)
downloadgcc-4f9664f71a5fceee103a188fd2cd8b70e1d6e584.zip
gcc-4f9664f71a5fceee103a188fd2cd8b70e1d6e584.tar.gz
gcc-4f9664f71a5fceee103a188fd2cd8b70e1d6e584.tar.bz2
score.h (REGISTER_MOVE_COST, [...]): Remove.
* config/score/score.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove. * config/score/score-protos.h (score_register_move_cost): Remove. * config/score/score.c (TARGET_REGISTER_MOVE_COST): Define. (score_register_move_cost): Make static. Change arguments type from enum reg_class to reg_class_t. From-SVN: r182666
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/score/score-protos.h2
-rw-r--r--gcc/config/score/score.c11
-rw-r--r--gcc/config/score/score.h8
4 files changed, 16 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1a8b35a..2784640 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-23 Anatoly Sokolov <aesok@post.ru>
+
+ * config/score/score.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove.
+ * config/score/score-protos.h (score_register_move_cost): Remove.
+ * config/score/score.c (TARGET_REGISTER_MOVE_COST): Define.
+ (score_register_move_cost): Make static. Change arguments type from
+ enum reg_class to reg_class_t.
+
2011-12-23 Jakub Jelinek <jakub@redhat.com>
Richard Henderson <rth@redhat.com>
diff --git a/gcc/config/score/score-protos.h b/gcc/config/score/score-protos.h
index dc56fc7..8dbebcb 100644
--- a/gcc/config/score/score-protos.h
+++ b/gcc/config/score/score-protos.h
@@ -42,8 +42,6 @@ extern bool score_block_move (rtx* ops);
extern int score_address_cost (rtx addr, bool speed);
extern int score_address_p (enum machine_mode mode, rtx x, int strict);
extern int score_reg_class (int regno);
-extern int score_register_move_cost (enum machine_mode mode, enum reg_class to,
- enum reg_class from);
extern int score_hard_regno_mode_ok (unsigned int, enum machine_mode);
extern int score_const_ok_for_letter_p (HOST_WIDE_INT value, char c);
extern int score_extra_constraint (rtx op, char c);
diff --git a/gcc/config/score/score.c b/gcc/config/score/score.c
index c789f22..28a0265 100644
--- a/gcc/config/score/score.c
+++ b/gcc/config/score/score.c
@@ -187,6 +187,9 @@ struct extern_list *extern_head = 0;
#undef TARGET_TRAMPOLINE_INIT
#define TARGET_TRAMPOLINE_INIT score_trampoline_init
+#undef TARGET_REGISTER_MOVE_COST
+#define TARGET_REGISTER_MOVE_COST score_register_move_cost
+
/* Return true if SYMBOL is a SYMBOL_REF and OFFSET + SYMBOL points
to the same object as SYMBOL. */
static int
@@ -998,11 +1001,13 @@ score_legitimate_address_p (enum machine_mode mode, rtx x, bool strict)
return score_classify_address (&addr, mode, x, strict);
}
-/* Return a number assessing the cost of moving a register in class
+/* Implement TARGET_REGISTER_MOVE_COST.
+
+ Return a number assessing the cost of moving a register in class
FROM to class TO. */
-int
+static int
score_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
- enum reg_class from, enum reg_class to)
+ reg_class_t from, reg_class_t to)
{
if (GR_REG_CLASS_P (from))
{
diff --git a/gcc/config/score/score.h b/gcc/config/score/score.h
index 3c8851a..ced282d 100644
--- a/gcc/config/score/score.h
+++ b/gcc/config/score/score.h
@@ -601,14 +601,6 @@ typedef struct score_args
#define REVERSIBLE_CC_MODE(MODE) 1
/* Describing Relative Costs of Operations */
-/* Compute extra cost of moving data between one register class and another. */
-#define REGISTER_MOVE_COST(MODE, FROM, TO) \
- score_register_move_cost (MODE, FROM, TO)
-
-/* Moves to and from memory are quite expensive */
-#define MEMORY_MOVE_COST(MODE, CLASS, TO_P) \
- (4 + memory_move_secondary_cost ((MODE), (CLASS), (TO_P)))
-
/* Try to generate sequences that don't involve branches. */
#define BRANCH_COST(speed_p, predictable_p) 2