From: James Greenhalgh Date: Fri, 16 May 2014 08:52:30 +0000 (+0000) Subject: [AArch64 costs 6/18] Set default costs and handle vector modes. X-Git-Tag: releases/gcc-5.1.0~7548 X-Git-Url: https://gcc.gnu.org/git/?a=commitdiff_plain;h=7fc5ef02f4a8071a6d323bc998cdb641e6070371;p=gcc.git [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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e449380a4411..97017485ef86 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2014-05-16 James Greenhalgh + + * config/aarch64/aarch64.c (aarch64_rtx_costs): Set default costs. + 2014-05-16 James Greenhalgh Philipp Tomsich diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 2b6479dc17c8..52189f4a9679 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: