* [PATCH][AArch64] Adjust generic move costs
@ 2014-11-14 14:55 Wilco Dijkstra
2014-11-17 17:24 ` Marcus Shawcroft
0 siblings, 1 reply; 5+ messages in thread
From: Wilco Dijkstra @ 2014-11-14 14:55 UTC (permalink / raw)
To: gcc-patches
Hi,
This patch adjusts the generic move costs to better reflect the INT<->FP move costs used in the
various core specific cost tables.
The intention of these generic costs is that they provide reasonable performance across a range of
cores without unduly pessimizing any one specific core.
This adjustment is sufficient to prevent the register allocator inserting huge amounts of
unnecessary int<->FP moves. The GP2FP/FP2GP costs must be larger than the memory cost to avoid the
worst of this issue. In sha2 this replaces all 642 redundant fp moves with 35 load and 7 store
spills.
OK for commit?
ChangeLog:
2014-11-14 Wilco Dijkstra <wdijkstr@arm.com>
* gcc/config/aarch64/aarch64.c (generic_regmove_cost):
Increase FP move cost.
---
gcc/config/aarch64/aarch64.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index de53c94..cd30724 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -218,8 +218,10 @@ __extension__
static const struct cpu_regmove_cost generic_regmove_cost =
{
NAMED_PARAM (GP2GP, 1),
- NAMED_PARAM (GP2FP, 2),
- NAMED_PARAM (FP2GP, 2),
+ /* Avoid the use of slow int<->fp moves for spilling by setting
+ their cost higher than memmov_cost. */
+ NAMED_PARAM (GP2FP, 5),
+ NAMED_PARAM (FP2GP, 5),
NAMED_PARAM (FP2FP, 2)
};
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][AArch64] Adjust generic move costs
2014-11-14 14:55 [PATCH][AArch64] Adjust generic move costs Wilco Dijkstra
@ 2014-11-17 17:24 ` Marcus Shawcroft
2014-11-18 16:06 ` Ramana Radhakrishnan
0 siblings, 1 reply; 5+ messages in thread
From: Marcus Shawcroft @ 2014-11-17 17:24 UTC (permalink / raw)
To: Wilco Dijkstra; +Cc: gcc-patches
On 14 November 2014 14:35, Wilco Dijkstra <wdijkstr@arm.com> wrote:
> 2014-11-14 Wilco Dijkstra <wdijkstr@arm.com>
>
> * gcc/config/aarch64/aarch64.c (generic_regmove_cost):
> Increase FP move cost.
OK /Marcus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][AArch64] Adjust generic move costs
2014-11-17 17:24 ` Marcus Shawcroft
@ 2014-11-18 16:06 ` Ramana Radhakrishnan
2014-11-19 14:44 ` Wilco Dijkstra
0 siblings, 1 reply; 5+ messages in thread
From: Ramana Radhakrishnan @ 2014-11-18 16:06 UTC (permalink / raw)
To: Marcus Shawcroft; +Cc: Wilco Dijkstra, gcc-patches
On Mon, Nov 17, 2014 at 5:13 PM, Marcus Shawcroft
<marcus.shawcroft@gmail.com> wrote:
> On 14 November 2014 14:35, Wilco Dijkstra <wdijkstr@arm.com> wrote:
>
>> 2014-11-14 Wilco Dijkstra <wdijkstr@arm.com>
>>
>> * gcc/config/aarch64/aarch64.c (generic_regmove_cost):
>> Increase FP move cost.
>
> OK /Marcus
Changelog should probably indicate PR target/61915 when committing ?
Ramana
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH][AArch64] Adjust generic move costs
2014-11-18 16:06 ` Ramana Radhakrishnan
@ 2014-11-19 14:44 ` Wilco Dijkstra
2014-11-19 16:08 ` Marcus Shawcroft
0 siblings, 1 reply; 5+ messages in thread
From: Wilco Dijkstra @ 2014-11-19 14:44 UTC (permalink / raw)
To: Jiong Wang; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 188 bytes --]
Hi Jiong,
Can you commit this please?
2014-11-19 Wilco Dijkstra <wdijkstr@arm.com>
* gcc/config/aarch64/aarch64.c (generic_regmove_cost):
Increase FP move cost (PR61915).
[-- Attachment #2: redundant_fmov.txt --]
[-- Type: text/plain, Size: 684 bytes --]
---
gcc/config/aarch64/aarch64.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index de53c94..cd30724 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -218,8 +218,10 @@ __extension__
static const struct cpu_regmove_cost generic_regmove_cost =
{
NAMED_PARAM (GP2GP, 1),
- NAMED_PARAM (GP2FP, 2),
- NAMED_PARAM (FP2GP, 2),
+ /* Avoid the use of slow int<->fp moves for spilling by setting
+ their cost higher than memmov_cost. */
+ NAMED_PARAM (GP2FP, 5),
+ NAMED_PARAM (FP2GP, 5),
NAMED_PARAM (FP2FP, 2)
};
--
1.9.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH][AArch64] Adjust generic move costs
2014-11-19 14:44 ` Wilco Dijkstra
@ 2014-11-19 16:08 ` Marcus Shawcroft
0 siblings, 0 replies; 5+ messages in thread
From: Marcus Shawcroft @ 2014-11-19 16:08 UTC (permalink / raw)
To: Wilco Dijkstra; +Cc: Jiong Wang, gcc-patches
On 19 November 2014 14:32, Wilco Dijkstra <wdijkstr@arm.com> wrote:
> Hi Jiong,
>
> Can you commit this please?
>
> 2014-11-19 Wilco Dijkstra <wdijkstr@arm.com>
>
> * gcc/config/aarch64/aarch64.c (generic_regmove_cost):
> Increase FP move cost (PR61915).
>
Use the proper format for referring to PR's in the Changelog.
/M
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-11-19 15:56 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-14 14:55 [PATCH][AArch64] Adjust generic move costs Wilco Dijkstra
2014-11-17 17:24 ` Marcus Shawcroft
2014-11-18 16:06 ` Ramana Radhakrishnan
2014-11-19 14:44 ` Wilco Dijkstra
2014-11-19 16:08 ` Marcus Shawcroft
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).