* 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
+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>
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);
#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
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))
{
#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