diff mbox

[nds32] Committed: Adjust MULT performance cost.

Message ID CADj25HPs5jqpd4wn-4va-r8ZkiS0vA1mt5adk3OmYrcnvKhpvA@mail.gmail.com
State New
Headers show

Commit Message

Chung-Ju Wu Nov. 28, 2013, 9:56 a.m. UTC
Hi, all,

The multiplication operation is low cost in nds32 target.
COSTS_N_INSNS(5) is too expensive for performance.
Adjust MULT cost to COSTS_N_INSNS(1).

Committed as Rev. 205478: http://gcc.gnu.org/r205478




Best regards,
jasonwucj
diff mbox

Patch

Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog       (revision 205477)
+++ gcc/ChangeLog       (working copy)
@@ -1,3 +1,8 @@ 
+2013-11-28  Chung-Ju Wu  <jasonwucj@gmail.com>
+
+       * config/nds32/nds32.c (nds32_rtx_costs): Adjust MULT cost if it is
+       not optimized for size.
+
 2013-11-28  Jakub Jelinek  <jakub@redhat.com>

        * cfgexpand.c (struct stack_vars_data): Add asan_base and asan_alignb

Index: gcc/config/nds32/nds32.c
===================================================================
--- gcc/config/nds32/nds32.c    (revision 205477)
+++ gcc/config/nds32/nds32.c    (working copy)
@@ -2471,7 +2471,7 @@ 
       break;

     case MULT:
-      *total = COSTS_N_INSNS (5);
+      *total = COSTS_N_INSNS (1);
       break;

     case DIV: