[ARM] Refactor costs calculation for MEM.
authorCharles Baylis <charles.baylis@linaro.org>
Thu, 23 Nov 2017 18:37:18 +0000 (18:37 +0000)
committerCharles Baylis <cbaylis@gcc.gnu.org>
Thu, 23 Nov 2017 18:37:18 +0000 (18:37 +0000)
commitc138eb5ce4f675fe9bdca939b6c43545d0f75691
treeee104dbcec3f3a84e5fc73a8c14a6e9ac646401e
parent207180e159492bd884a37b071bc69a011072e403
[ARM] Refactor costs calculation for MEM.

This patch moves the calculation of costs for MEM into a
separate function, and reforms the calculation into two
parts. Firstly any additional cost of the addressing mode
is calculated, and then the cost of the memory access itself
is added.

In this patch, the calculation of the cost of the addressing
mode is omitted, to be added in a subsequent patch.

gcc/ChangeLog:

<date>  Charles Baylis  <charles.baylis@linaro.org>

        * config/arm/arm.c (arm_mem_costs): New function.
        (arm_rtx_costs_internal): Use arm_mem_costs.

gcc/testsuite/ChangeLog:

<date>  Charles Baylis  <charles.baylis@linaro.org>

        * gcc.target/arm/addr-modes-float.c: New test.
        * gcc.target/arm/addr-modes-int.c: New test.
        * gcc.target/arm/addr-modes.h: New header.

From-SVN: r255111
gcc/ChangeLog
gcc/config/arm/arm.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/addr-modes-float.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/addr-modes-int.c [new file with mode: 0644]
gcc/testsuite/gcc.target/arm/addr-modes.h [new file with mode: 0644]