diff mbox

Adjust variable shift costs for IA MCU

Message ID 20150709180527.GA29480@intel.com
State New
Headers show

Commit Message

H.J. Lu July 9, 2015, 6:05 p.m. UTC
We reduce code size for IA MCU by adjusting variable shift costs for IA
MCU.  OK for trunk?

Thanks.


H.J.
---
	PR target/66821
	* config/i386/i386.c (iamcu_cost): Adjust variable shift costs.
---
 gcc/config/i386/i386.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Uros Bizjak July 9, 2015, 8:30 p.m. UTC | #1
On Thu, Jul 9, 2015 at 8:05 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> We reduce code size for IA MCU by adjusting variable shift costs for IA
> MCU.  OK for trunk?

IMO, tuning patches should fall into "obvious" category. I don't have
any data to to do any meaningful review of a cost metric for a new
target.

So, instead of rubberstamping them again and again, these kind of
patches are pre-approved for all non-algorithmic tuning changes for
IAMCU target.

Uros.

> Thanks.
>
>
> H.J.
> ---
>         PR target/66821
>         * config/i386/i386.c (iamcu_cost): Adjust variable shift costs.
> ---
>  gcc/config/i386/i386.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
> index 85e59a8..e4e505c 100644
> --- a/gcc/config/i386/i386.c
> +++ b/gcc/config/i386/i386.c
> @@ -420,7 +420,7 @@ static const
>  struct processor_costs iamcu_cost = {
>    COSTS_N_INSNS (1),                   /* cost of an add instruction */
>    COSTS_N_INSNS (1) + 1,               /* cost of a lea instruction */
> -  COSTS_N_INSNS (4),                   /* variable shift costs */
> +  COSTS_N_INSNS (1),                   /* variable shift costs */
>    COSTS_N_INSNS (1),                   /* constant shift costs */
>    {COSTS_N_INSNS (11),                 /* cost of starting multiply for QI */
>     COSTS_N_INSNS (11),                 /*                               HI */
> --
> 2.4.3
>
H.J. Lu July 9, 2015, 8:36 p.m. UTC | #2
On Thu, Jul 9, 2015 at 1:30 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Thu, Jul 9, 2015 at 8:05 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
>> We reduce code size for IA MCU by adjusting variable shift costs for IA
>> MCU.  OK for trunk?
>
> IMO, tuning patches should fall into "obvious" category. I don't have
> any data to to do any meaningful review of a cost metric for a new
> target.
>
> So, instead of rubberstamping them again and again, these kind of
> patches are pre-approved for all non-algorithmic tuning changes for
> IAMCU target.
>

I will keep it in mind.

Thanks.
diff mbox

Patch

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 85e59a8..e4e505c 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -420,7 +420,7 @@  static const
 struct processor_costs iamcu_cost = {
   COSTS_N_INSNS (1),			/* cost of an add instruction */
   COSTS_N_INSNS (1) + 1,		/* cost of a lea instruction */
-  COSTS_N_INSNS (4),			/* variable shift costs */
+  COSTS_N_INSNS (1),			/* variable shift costs */
   COSTS_N_INSNS (1),			/* constant shift costs */
   {COSTS_N_INSNS (11),			/* cost of starting multiply for QI */
    COSTS_N_INSNS (11),			/*				 HI */