score.h (REGISTER_MOVE_COST, [...]): Remove.
authorAnatoly Sokolov <aesok@post.ru>
Fri, 23 Dec 2011 21:40:42 +0000 (01:40 +0400)
committerAnatoly Sokolov <aesok@gcc.gnu.org>
Fri, 23 Dec 2011 21:40:42 +0000 (01:40 +0400)
* 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

gcc/ChangeLog
gcc/config/score/score-protos.h
gcc/config/score/score.c
gcc/config/score/score.h

index 1a8b35a7f2461810407bf335c0a4da91672c3895..278464097e91c8e4d2182a6e4ec201b57398acb3 100644 (file)
@@ -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>
 
index dc56fc7e5dd3fecf5ea99a6b558ba3d7dcc7fa00..8dbebcbe241f35c7da07aa8db9b16bfe4634d0cd 100644 (file)
@@ -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);
index c789f22f1bbfe5379641b9f3e63c518f1f25f611..28a0265978b9286f383a5885ab594fc34b6e67c4 100644 (file)
@@ -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))
     {
index 3c8851a602fe31bd9cfb7bd3b2e4688f875a450d..ced282d6382cff92469e46b52e22d9c9e347f562 100644 (file)
@@ -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