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
This commit is contained in:
Anatoly Sokolov 2011-12-24 01:40:42 +04:00 committed by Anatoly Sokolov
parent 54eca047c7
commit 4f9664f71a
4 changed files with 16 additions and 13 deletions

View 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>

View 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);

View 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))
{

View 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