Commit 72d6e3c5 by Richard Henderson Committed by Richard Henderson

mn10300: Clean up costing.

Address, register, memory and rtx costs bore little relation to reality.

From-SVN: r168678
parent 62d3f9b2
2011-01-11 Richard Henderson <rth@redhat.com>
* config/mn10300/mn10300.c (mn10300_address_cost): Remove forward
declaration. Rewrite for both speed and size.
(mn10300_address_cost_1): Remove.
(mn10300_register_move_cost): New.
(mn10300_memory_move_cost): New.
(mn10300_rtx_costs): Rewrite for both speed and size. Don't handle
ZERO_EXTRACT. Do handle UNSPEC, arithmetic, logicals, compare,
extensions, shifts, BSWAP, CLZ.
(mn10300_wide_const_load_uses_clr): Remove.
(TARGET_REGISTER_MOVE_COST): New.
(TARGET_MEMORY_MOVE_COST): New.
* config/mn10300/mn10300-protos.h: Update.
* config/mn10300/mn10300.h (REGISTER_MOVE_COST): Remove.
* config/mn10300/constraints.md ("R", "T"): Remove constraints.
* config/mn10300/mn10300.c (mn10300_mask_ok_for_mem_btst): Remove.
* config/mn10300/mn10300-protos.h: Update.
......
......@@ -39,7 +39,6 @@ extern Rclas mn10300_secondary_reload_class (Rclas, Mmode, rtx);
extern Mmode mn10300_select_cc_mode (rtx);
extern int mn10300_store_multiple_operation (rtx, Mmode);
extern int mn10300_symbolic_operand (rtx, Mmode);
extern bool mn10300_wide_const_load_uses_clr (rtx operands[2]);
#endif /* RTX_CODE */
extern int mn10300_can_use_return_insn (void);
......
......@@ -600,19 +600,6 @@ struct cum_arg
#define SELECT_CC_MODE(OP, X, Y) mn10300_select_cc_mode (X)
#define REVERSIBLE_CC_MODE(MODE) 0
#define REGISTER_MOVE_COST(MODE, CLASS1, CLASS2) \
((CLASS1 == CLASS2 && (CLASS1 == ADDRESS_REGS || CLASS1 == DATA_REGS)) ? 2 :\
((CLASS1 == ADDRESS_REGS || CLASS1 == DATA_REGS) && \
(CLASS2 == ADDRESS_REGS || CLASS2 == DATA_REGS)) ? 4 : \
(CLASS1 == SP_REGS && CLASS2 == ADDRESS_REGS) ? 2 : \
(CLASS1 == ADDRESS_REGS && CLASS2 == SP_REGS) ? 4 : \
! TARGET_AM33 ? 6 : \
(CLASS1 == SP_REGS || CLASS2 == SP_REGS) ? 6 : \
(CLASS1 == CLASS2 && CLASS1 == EXTENDED_REGS) ? 6 : \
(CLASS1 == FP_REGS || CLASS2 == FP_REGS) ? 6 : \
(CLASS1 == EXTENDED_REGS || CLASS2 == EXTENDED_REGS) ? 4 : \
4)
/* Nonzero if access to memory by bytes or half words is no faster
than accessing full words. */
#define SLOW_BYTE_ACCESS 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment