From 4f9664f71a5fceee103a188fd2cd8b70e1d6e584 Mon Sep 17 00:00:00 2001 From: Anatoly Sokolov Date: Sat, 24 Dec 2011 01:40:42 +0400 Subject: [PATCH] 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 --- gcc/ChangeLog | 8 ++++++++ gcc/config/score/score-protos.h | 2 -- gcc/config/score/score.c | 11 ++++++++--- gcc/config/score/score.h | 8 -------- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a8b35a7f24..278464097e9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2011-12-23 Anatoly Sokolov + + * 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 Richard Henderson diff --git a/gcc/config/score/score-protos.h b/gcc/config/score/score-protos.h index dc56fc7e5dd..8dbebcbe241 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 c789f22f1bb..28a0265978b 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 3c8851a602f..ced282d6382 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 -- 2.30.2