From: Evandro Menezes <e.menezes@samsung.com>
To: gcc-patches@gcc.gnu.org, Marcus.Shawcroft@arm.com,
kyrylo.tkachov@arm.com
Subject: [PATCH] [AArch64] Distinct costs for sign and zero extension
Date: Mon, 19 Oct 2015 23:40:00 -0000 [thread overview]
Message-ID: <56257859.5090109@samsung.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 350 bytes --]
Some micro-architectures may favor one of sign or zero extension over
the other in the base plus extended register offset addressing mode.
This patch separates the member "register_extend" of the structure
"cpu_addrcost_table" into two, one for sign and the other zero extension.
Please, commit if it's alright.
Thank you,
--
Evandro Menezes
[-- Attachment #2: 0001-AArch64-Distinct-costs-for-sign-and-zero-extension.patch --]
[-- Type: text/x-patch, Size: 2516 bytes --]
From 2efc8994abfbab65d04009fa1c0a8900804c23bb Mon Sep 17 00:00:00 2001
From: Evandro Menezes <e.menezes@samsung.com>
Date: Tue, 8 Sep 2015 15:15:56 -0500
Subject: [PATCH] [AArch64] Distinct costs for sign and zero extension
gcc/
* config/aarch64/aarch64.c (generic_addrcost_table,
cortexa57_addrcost_table, xgene1_addrcost_table): Infer values for sign
and zero register extension.
* config/aarch64/aarch64-protos.h (cpu_addrcost_table): Split member
for register extension into sign and zero register extension.
---
gcc/config/aarch64/aarch64-protos.h | 3 ++-
gcc/config/aarch64/aarch64.c | 16 +++++++++++-----
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h
index baaf1bd..3c46222 100644
--- a/gcc/config/aarch64/aarch64-protos.h
+++ b/gcc/config/aarch64/aarch64-protos.h
@@ -134,7 +134,8 @@ struct cpu_addrcost_table
const int pre_modify;
const int post_modify;
const int register_offset;
- const int register_extend;
+ const int register_sextend;
+ const int register_zextend;
const int imm_offset;
};
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index aba5b56..47dbe74 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -190,7 +190,8 @@ static const struct cpu_addrcost_table generic_addrcost_table =
0, /* pre_modify */
0, /* post_modify */
0, /* register_offset */
- 0, /* register_extend */
+ 0, /* register_sextend */
+ 0, /* register_zextend */
0 /* imm_offset */
};
@@ -205,7 +206,8 @@ static const struct cpu_addrcost_table cortexa57_addrcost_table =
0, /* pre_modify */
0, /* post_modify */
0, /* register_offset */
- 0, /* register_extend */
+ 0, /* register_sextend */
+ 0, /* register_zextend */
0, /* imm_offset */
};
@@ -220,7 +222,8 @@ static const struct cpu_addrcost_table xgene1_addrcost_table =
1, /* pre_modify */
0, /* post_modify */
0, /* register_offset */
- 1, /* register_extend */
+ 1, /* register_sextend */
+ 1, /* register_zextend */
0, /* imm_offset */
};
@@ -5508,9 +5511,12 @@ aarch64_address_cost (rtx x,
cost += addr_cost->register_offset;
break;
- case ADDRESS_REG_UXTW:
case ADDRESS_REG_SXTW:
- cost += addr_cost->register_extend;
+ cost += addr_cost->register_sextend;
+ break;
+
+ case ADDRESS_REG_UXTW:
+ cost += addr_cost->register_zextend;
break;
default:
--
2.1.0.243.g30d45f7
next reply other threads:[~2015-10-19 23:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-19 23:40 Evandro Menezes [this message]
2015-10-19 23:59 ` Andrew Pinski
2015-10-27 12:02 ` James Greenhalgh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56257859.5090109@samsung.com \
--to=e.menezes@samsung.com \
--cc=Marcus.Shawcroft@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=kyrylo.tkachov@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).