[NDS32] Rewrite cost model.
commit3766c11be8b9dc20ae2ed7a9b5949055823fec03
authorjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 20 May 2018 07:23:39 +0000 (20 07:23 +0000)
committerjasonwucj <jasonwucj@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 20 May 2018 07:23:39 +0000 (20 07:23 +0000)
treed2f91bea2615a61a6a77d8c4aae5eb01e6188c0c
parentce88254461c678cd9c99fa780e25b66ea6fa0b3e
[NDS32] Rewrite cost model.

gcc/
* config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
(insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
(nds32_rtx_costs_impl): Simplify.
(nds32_address_cost_impl): Simplify.
(nds32_init_rtx_costs): New function.
(nds32_rtx_costs_speed_prefer): Likewise.
(nds32_rtx_costs_size_prefer): Likewise.
(nds32_address_cost_speed_prefer): Likewise.
(nds32_address_cost_speed_fwprop): Likewise.
(nds32_address_cost_size_prefer): Likewise.
* config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
* config/nds32/nds32.c (nds32_option_override): Use
nds32_init_rtx_costs function.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260411 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/nds32/nds32-cost.c
gcc/config/nds32/nds32-protos.h
gcc/config/nds32/nds32.c