public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][AArch64] Fix Cortex-A53 shift costs
@ 2015-03-05 14:49 Wilco Dijkstra
       [not found] ` <CAFqB+Pzsi73v5nVJgwuTFwp4rKGw0=Vj7YDW34KeV-G3V8ayOQ@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Wilco Dijkstra @ 2015-03-05 14:49 UTC (permalink / raw)
  To: gcc-patches

This patch fixes the shift costs for Cortex-A53 so they are more accurate - immediate shifts use
SBFM/UBFM which takes 2 cycles, register controlled shifts take 1 cycle. Bootstrap and regression
OK.

ChangeLog: 
2015-03-05  Wilco Dijkstra  <wdijkstr@arm.com>

	* gcc/config/arm/aarch-cost-tables.h (cortexa53_extra_costs):
	Make Cortex-A53 shift costs more accurate.

---
 gcc/config/arm/aarch-cost-tables.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/config/arm/aarch-cost-tables.h b/gcc/config/arm/aarch-cost-tables.h
index 05e96a9..6bb8ede 100644
--- a/gcc/config/arm/aarch-cost-tables.h
+++ b/gcc/config/arm/aarch-cost-tables.h
@@ -130,12 +130,12 @@ const struct cpu_cost_table cortexa53_extra_costs =
     0,			/* arith.  */
     0,			/* logical.  */
     COSTS_N_INSNS (1),	/* shift.  */
-    COSTS_N_INSNS (2),	/* shift_reg.  */
+    0,			/* shift_reg.  */
     COSTS_N_INSNS (1),	/* arith_shift.  */
-    COSTS_N_INSNS (2),	/* arith_shift_reg.  */
+    COSTS_N_INSNS (1),	/* arith_shift_reg.  */
     COSTS_N_INSNS (1),	/* log_shift.  */
-    COSTS_N_INSNS (2),	/* log_shift_reg.  */
-    0,			/* extend.  */
+    COSTS_N_INSNS (1),	/* log_shift_reg.  */
+    COSTS_N_INSNS (1),	/* extend.  */
     COSTS_N_INSNS (1),	/* extend_arith.  */
     COSTS_N_INSNS (1),	/* bfi.  */
     COSTS_N_INSNS (1),	/* bfx.  */
-- 
1.9.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH][AArch64] Fix Cortex-A53 shift costs
       [not found] ` <CAFqB+Pzsi73v5nVJgwuTFwp4rKGw0=Vj7YDW34KeV-G3V8ayOQ@mail.gmail.com>
@ 2015-05-01 13:07   ` Wilco Dijkstra
  2015-05-01 13:09     ` Kyrill Tkachov
  0 siblings, 1 reply; 4+ messages in thread
From: Wilco Dijkstra @ 2015-05-01 13:07 UTC (permalink / raw)
  To: Kyrylo Tkachov; +Cc: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 776 bytes --]

> Marcus Shawcroft wrote:
> On 5 March 2015 at 14:49, Wilco Dijkstra <wdijkstr@arm.com> wrote:
> > This patch fixes the shift costs for Cortex-A53 so they are more accurate - immediate shifts
> use
> > SBFM/UBFM which takes 2 cycles, register controlled shifts take 1 cycle. Bootstrap and
> regression
> > OK.
> >
> > ChangeLog:
> > 2015-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
> >
> >         * gcc/config/arm/aarch-cost-tables.h (cortexa53_extra_costs):
> >         Make Cortex-A53 shift costs more accurate.
> 
> OK /Marcus

Kyrill, could you check this in please? Patch attached

Wilco

2015-05-01  Wilco Dijkstra  <wdijkstr@arm.com>

	* gcc/config/arm/aarch-cost-tables.h (cortexa53_extra_costs):
	Make Cortex-A53 shift costs more accurate.



[-- Attachment #2: 0001-Fix-A53-shift-costs.txt --]
[-- Type: text/plain, Size: 1026 bytes --]

---
 gcc/config/arm/aarch-cost-tables.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/config/arm/aarch-cost-tables.h b/gcc/config/arm/aarch-cost-tables.h
index 05e96a9..6bb8ede 100644
--- a/gcc/config/arm/aarch-cost-tables.h
+++ b/gcc/config/arm/aarch-cost-tables.h
@@ -130,12 +130,12 @@ const struct cpu_cost_table cortexa53_extra_costs =
     0,			/* arith.  */
     0,			/* logical.  */
     COSTS_N_INSNS (1),	/* shift.  */
-    COSTS_N_INSNS (2),	/* shift_reg.  */
+    0,			/* shift_reg.  */
     COSTS_N_INSNS (1),	/* arith_shift.  */
-    COSTS_N_INSNS (2),	/* arith_shift_reg.  */
+    COSTS_N_INSNS (1),	/* arith_shift_reg.  */
     COSTS_N_INSNS (1),	/* log_shift.  */
-    COSTS_N_INSNS (2),	/* log_shift_reg.  */
-    0,			/* extend.  */
+    COSTS_N_INSNS (1),	/* log_shift_reg.  */
+    COSTS_N_INSNS (1),	/* extend.  */
     COSTS_N_INSNS (1),	/* extend_arith.  */
     COSTS_N_INSNS (1),	/* bfi.  */
     COSTS_N_INSNS (1),	/* bfx.  */
-- 
1.9.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH][AArch64] Fix Cortex-A53 shift costs
  2015-05-01 13:07   ` Wilco Dijkstra
@ 2015-05-01 13:09     ` Kyrill Tkachov
  0 siblings, 0 replies; 4+ messages in thread
From: Kyrill Tkachov @ 2015-05-01 13:09 UTC (permalink / raw)
  To: Wilco Dijkstra; +Cc: GCC Patches


On 01/05/15 14:07, Wilco Dijkstra wrote:
>> Marcus Shawcroft wrote:
>> On 5 March 2015 at 14:49, Wilco Dijkstra <wdijkstr@arm.com> wrote:
>>> This patch fixes the shift costs for Cortex-A53 so they are more accurate - immediate shifts
>> use
>>> SBFM/UBFM which takes 2 cycles, register controlled shifts take 1 cycle. Bootstrap and
>> regression
>>> OK.
>>>
>>> ChangeLog:
>>> 2015-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
>>>
>>>          * gcc/config/arm/aarch-cost-tables.h (cortexa53_extra_costs):
>>>          Make Cortex-A53 shift costs more accurate.
>> OK /Marcus
> Kyrill, could you check this in please? Patch attached

Hi Wilco,

I've committed this with r222678.

Cheers,
Kyrill

>
> Wilco
>
> 2015-05-01  Wilco Dijkstra  <wdijkstr@arm.com>
>
> 	* gcc/config/arm/aarch-cost-tables.h (cortexa53_extra_costs):
> 	Make Cortex-A53 shift costs more accurate.
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH][AArch64] Fix Cortex-A53 shift costs
@ 2015-04-27 14:05 Wilco Dijkstra
  0 siblings, 0 replies; 4+ messages in thread
From: Wilco Dijkstra @ 2015-04-27 14:05 UTC (permalink / raw)
  To: gcc-patches

ping

> -----Original Message-----
> From: Wilco Dijkstra [mailto:wdijkstr@arm.com]
> Sent: 05 March 2015 14:49
> To: gcc-patches@gcc.gnu.org
> Subject: [PATCH][AArch64] Fix Cortex-A53 shift costs
> 
> This patch fixes the shift costs for Cortex-A53 so they are more accurate - immediate shifts
> use SBFM/UBFM which takes 2 cycles, register controlled shifts take 1 cycle. Bootstrap and
> regression OK.
> 
> ChangeLog:
> 2015-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
> 
> 	* gcc/config/arm/aarch-cost-tables.h (cortexa53_extra_costs):
> 	Make Cortex-A53 shift costs more accurate.
> 
> ---
>  gcc/config/arm/aarch-cost-tables.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/gcc/config/arm/aarch-cost-tables.h b/gcc/config/arm/aarch-cost-tables.h
> index 05e96a9..6bb8ede 100644
> --- a/gcc/config/arm/aarch-cost-tables.h
> +++ b/gcc/config/arm/aarch-cost-tables.h
> @@ -130,12 +130,12 @@ const struct cpu_cost_table cortexa53_extra_costs =
>      0,			/* arith.  */
>      0,			/* logical.  */
>      COSTS_N_INSNS (1),	/* shift.  */
> -    COSTS_N_INSNS (2),	/* shift_reg.  */
> +    0,			/* shift_reg.  */
>      COSTS_N_INSNS (1),	/* arith_shift.  */
> -    COSTS_N_INSNS (2),	/* arith_shift_reg.  */
> +    COSTS_N_INSNS (1),	/* arith_shift_reg.  */
>      COSTS_N_INSNS (1),	/* log_shift.  */
> -    COSTS_N_INSNS (2),	/* log_shift_reg.  */
> -    0,			/* extend.  */
> +    COSTS_N_INSNS (1),	/* log_shift_reg.  */
> +    COSTS_N_INSNS (1),	/* extend.  */
>      COSTS_N_INSNS (1),	/* extend_arith.  */
>      COSTS_N_INSNS (1),	/* bfi.  */
>      COSTS_N_INSNS (1),	/* bfx.  */
> --
> 1.9.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-01 13:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-05 14:49 [PATCH][AArch64] Fix Cortex-A53 shift costs Wilco Dijkstra
     [not found] ` <CAFqB+Pzsi73v5nVJgwuTFwp4rKGw0=Vj7YDW34KeV-G3V8ayOQ@mail.gmail.com>
2015-05-01 13:07   ` Wilco Dijkstra
2015-05-01 13:09     ` Kyrill Tkachov
2015-04-27 14:05 Wilco Dijkstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).