diff options
author | Anatoly Sokolov <aesok@post.ru> | 2010-07-11 01:42:15 +0400 |
---|---|---|
committer | Anatoly Sokolov <aesok@gcc.gnu.org> | 2010-07-11 01:42:15 +0400 |
commit | a56b31caff25c5583ad6b7db6b828b6b07582fc9 (patch) | |
tree | 3550a11df33366ca32eb249890c987d9056dd0d7 | |
parent | bec922f0407cfb7f184581dc7b5cc10d91cc1063 (diff) | |
download | gcc-a56b31caff25c5583ad6b7db6b828b6b07582fc9.zip gcc-a56b31caff25c5583ad6b7db6b828b6b07582fc9.tar.gz gcc-a56b31caff25c5583ad6b7db6b828b6b07582fc9.tar.bz2 |
reginfo.h (reg_classes_intersect_p): Change arguments type to reg_class_t.
* reginfo.h (reg_classes_intersect_p): Change arguments type to
reg_class_t.
* rtl.h (reg_classes_intersect_p): Adjust prototype.
* config/rs6000/rs6000.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST):
Remove macros.
* config/rs6000/rs6000-protos.h (rs6000_register_move_cost,
rs6000_memory_move_cost): Remove
* config/rs6000/rs6000.c (TARGET_REGISTER_MOVE_COST,
TARGET_MEMORY_MOVE_COST): Define.
(rs6000_register_move_cost): Make static. Change arguments type from
enum reg_class to reg_class_t. Adjust rs6000_memory_move_cost calls.
(rs6000_memory_move_cost): Make static. Change arguments type from
'enum reg_class' to reg_class_t.
From-SVN: r162045
-rw-r--r-- | gcc/ChangeLog | 17 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000-protos.h | 3 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 21 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.h | 10 | ||||
-rw-r--r-- | gcc/reginfo.c | 2 | ||||
-rw-r--r-- | gcc/rtl.h | 2 |
6 files changed, 33 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 201f56d..364118c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2010-07-10 Anatoly Sokolov <aesok@post.ru> + + * reginfo.h (reg_classes_intersect_p): Change arguments type to + reg_class_t. + * rtl.h (reg_classes_intersect_p): Adjust prototype. + + * config/rs6000/rs6000.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): + Remove macros. + * config/rs6000/rs6000-protos.h (rs6000_register_move_cost, + rs6000_memory_move_cost): Remove + * config/rs6000/rs6000.c (TARGET_REGISTER_MOVE_COST, + TARGET_MEMORY_MOVE_COST): Define. + (rs6000_register_move_cost): Make static. Change arguments type from + enum reg_class to reg_class_t. Adjust rs6000_memory_move_cost calls. + (rs6000_memory_move_cost): Make static. Change arguments type from + 'enum reg_class' to reg_class_t. + 2010-07-10 Sandra Loosemore <sandra@codesourcery.com> PR middle-end/42505 diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h index 9e978bd..02377f2 100644 --- a/gcc/config/rs6000/rs6000-protos.h +++ b/gcc/config/rs6000/rs6000-protos.h @@ -170,9 +170,6 @@ extern unsigned int rs6000_dbx_register_number (unsigned int); extern void rs6000_emit_epilogue (int); extern void rs6000_emit_eh_reg_restore (rtx, rtx); extern const char * output_isel (rtx *); -extern int rs6000_register_move_cost (enum machine_mode, - enum reg_class, enum reg_class); -extern int rs6000_memory_move_cost (enum machine_mode, enum reg_class, int); extern bool rs6000_tls_referenced_p (rtx); extern void rs6000_conditional_register_usage (void); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index cd784fd..23f6a56 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1031,6 +1031,9 @@ static void rs6000_xcoff_file_start (void); static void rs6000_xcoff_file_end (void); #endif static int rs6000_variable_issue (FILE *, int, rtx, int); +static int rs6000_register_move_cost (enum machine_mode, + reg_class_t, reg_class_t); +static int rs6000_memory_move_cost (enum machine_mode, reg_class_t, bool); static bool rs6000_rtx_costs (rtx, int, int, int *, bool); static bool rs6000_debug_rtx_costs (rtx, int, int, int *, bool); static int rs6000_debug_address_cost (rtx, bool); @@ -1508,6 +1511,10 @@ static const struct attribute_spec rs6000_attribute_table[] = #undef TARGET_INVALID_WITHIN_DOLOOP #define TARGET_INVALID_WITHIN_DOLOOP rs6000_invalid_within_doloop +#undef TARGET_REGISTER_MOVE_COST +#define TARGET_REGISTER_MOVE_COST rs6000_register_move_cost +#undef TARGET_MEMORY_MOVE_COST +#define TARGET_MEMORY_MOVE_COST rs6000_memory_move_cost #undef TARGET_RTX_COSTS #define TARGET_RTX_COSTS rs6000_rtx_costs #undef TARGET_ADDRESS_COST @@ -25573,9 +25580,9 @@ rs6000_debug_address_cost (rtx x, bool speed) /* A C expression returning the cost of moving data from a register of class CLASS1 to one of CLASS2. */ -int +static int rs6000_register_move_cost (enum machine_mode mode, - enum reg_class from, enum reg_class to) + reg_class_t from, reg_class_t to) { int ret; @@ -25587,8 +25594,8 @@ rs6000_register_move_cost (enum machine_mode mode, from = to; if (from == FLOAT_REGS || from == ALTIVEC_REGS || from == VSX_REGS) - ret = (rs6000_memory_move_cost (mode, from, 0) - + rs6000_memory_move_cost (mode, GENERAL_REGS, 0)); + ret = (rs6000_memory_move_cost (mode, from, false) + + rs6000_memory_move_cost (mode, GENERAL_REGS, false)); /* It's more expensive to move CR_REGS than CR0_REGS because of the shift. */ @@ -25633,9 +25640,9 @@ rs6000_register_move_cost (enum machine_mode mode, /* A C expressions returning the cost of moving data of MODE from a register to or from memory. */ -int -rs6000_memory_move_cost (enum machine_mode mode, enum reg_class rclass, - int in ATTRIBUTE_UNUSED) +static int +rs6000_memory_move_cost (enum machine_mode mode, reg_class_t rclass, + bool in ATTRIBUTE_UNUSED) { int ret; diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index 68aec5b..ab07845 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -1173,16 +1173,6 @@ extern unsigned rs6000_pointer_size; #define HARD_REGNO_RENAME_OK(SRC, DST) \ (! ALTIVEC_REGNO_P (DST) || df_regs_ever_live_p (DST)) -/* A C expression returning the cost of moving data from a register of class - CLASS1 to one of CLASS2. */ - -#define REGISTER_MOVE_COST rs6000_register_move_cost - -/* A C expressions returning the cost of moving data of MODE from a register to - or from memory. */ - -#define MEMORY_MOVE_COST rs6000_memory_move_cost - /* Specify the cost of a branch insn; roughly the number of extra insns that should be added to avoid a branch. diff --git a/gcc/reginfo.c b/gcc/reginfo.c index 40f21d1..a9d29c8 100644 --- a/gcc/reginfo.c +++ b/gcc/reginfo.c @@ -1256,7 +1256,7 @@ reg_class_subset_p (enum reg_class c1, enum reg_class c2) /* Return nonzero if there is a register that is in both C1 and C2. */ int -reg_classes_intersect_p (enum reg_class c1, enum reg_class c2) +reg_classes_intersect_p (reg_class_t c1, reg_class_t c2) { return (c1 == c2 || c1 == ALL_REGS @@ -2314,7 +2314,7 @@ extern HARD_REG_SET eliminable_regset; extern void mark_elimination (int, int); /* In reginfo.c */ -extern int reg_classes_intersect_p (enum reg_class, enum reg_class); +extern int reg_classes_intersect_p (reg_class_t, reg_class_t); extern int reg_class_subset_p (enum reg_class, enum reg_class); extern void globalize_reg (int); extern void init_reg_modes_target (void); |