aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJames Greenhalgh <james.greenhalgh@arm.com>2014-05-16 08:52:30 +0000
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>2014-05-16 08:52:30 +0000
commit7fc5ef02f4a8071a6d323bc998cdb641e6070371 (patch)
tree5b32b72eb14bd743dd938b39c41813c541e2bb94 /gcc
parent4745e70151b781ec1013ea417c9eb627c1cf88a3 (diff)
downloadgcc-7fc5ef02f4a8071a6d323bc998cdb641e6070371.zip
gcc-7fc5ef02f4a8071a6d323bc998cdb641e6070371.tar.gz
gcc-7fc5ef02f4a8071a6d323bc998cdb641e6070371.tar.bz2
[AArch64 costs 6/18] Set default costs and handle vector modes.
gcc/ * config/aarch64/aarch64.c (aarch64_rtx_costs): Set default costs. From-SVN: r210498
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/config/aarch64/aarch64.c15
2 files changed, 19 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e449380..9701748 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,8 @@
2014-05-16 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * config/aarch64/aarch64.c (aarch64_rtx_costs): Set default costs.
+
+2014-05-16 James Greenhalgh <james.greenhalgh@arm.com>
Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* config/aarch64/aarch64.c (aarch64_strip_shift_or_extend): Rename
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 2b6479d..52189f4 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -4843,6 +4843,21 @@ aarch64_rtx_costs (rtx x, int code, int outer ATTRIBUTE_UNUSED,
= aarch64_tune_params->insn_extra_cost;
enum machine_mode mode = GET_MODE (x);
+ /* By default, assume that everything has equivalent cost to the
+ cheapest instruction. Any additional costs are applied as a delta
+ above this default. */
+ *cost = COSTS_N_INSNS (1);
+
+ /* TODO: The cost infrastructure currently does not handle
+ vector operations. Assume that all vector operations
+ are equally expensive. */
+ if (VECTOR_MODE_P (mode))
+ {
+ if (speed)
+ *cost += extra_cost->vect.alu;
+ return true;
+ }
+
switch (code)
{
case SET: