[NDS32] Rewrite cost model.
authorKito Cheng <kito.cheng@gmail.com>
Sun, 20 May 2018 07:23:39 +0000 (07:23 +0000)
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>
Sun, 20 May 2018 07:23:39 +0000 (07:23 +0000)
commit19c93809c274015f25db9856ffdfb40df3a828ab
treed2f91bea2615a61a6a77d8c4aae5eb01e6188c0c
parentb5535ac221b936706dd159497703817d75ea18a0
[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.

Co-Authored-By: Chung-Ju Wu <jasonwucj@gmail.com>
From-SVN: r260411
gcc/ChangeLog
gcc/config/nds32/nds32-cost.c
gcc/config/nds32/nds32-protos.h
gcc/config/nds32/nds32.c