aarch64: Add CPU-specific SVE vector costs struct
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Tue, 1 Dec 2020 14:53:30 +0000 (14:53 +0000)
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>
Wed, 9 Dec 2020 14:05:30 +0000 (14:05 +0000)
commit76e4f444a6eb681a60ffae17a10f55631ba9bf69
tree000e8e86bf8369c24009a1d60c8466abc105f578
parentcf97b970fe598740ee0833729bcdce5dc3913f2d
aarch64: Add CPU-specific SVE vector costs struct

This patch extends the backend vector costs structures to allow for
separate Advanced SIMD and SVE
costs. The fields in the current cpu_vector_costs that would vary
between the ISAs are moved into
a simd_vec_cost struct and we have two typedefs of it: advsimd_vec_cost
and sve_vec_costs.
If, in the future, SVE needs some extra fields it could inherit from
simd_vec_cost.
The CPU vector cost tables in aarch64.c are updated for the struct
changes.
aarch64_builtin_vectorization_cost is updated to select either the
Advanced SIMD or SVE costs field
depending on the mode and field availability.
No change in codegen is intended with this patch.

gcc/
* config/aarch64/aarch64-protos.h (cpu_vector_cost): Move simd
fields to...
(simd_vec_cost): ... Here.  Define.
(advsimd_vec_cost): Define.
(sve_vec_cost): Define.
* config/aarch64/aarch64.c (generic_advsimd_vector_cost):
Define.
(generic_sve_vector_cost): Likewise.
(generic_vector_cost): Update.
(qdf24xx_advsimd_vector_cost): Define.
(qdf24xx_vector_cost): Update.
(thunderx_advsimd_vector_cost): Define.
(thunderx_vector_cost): Update.
(tsv110_advsimd_vector_cost): Define.
(tsv110_vector_cost): Likewise.
(cortexa57_advsimd_vector_cost): Define.
(cortexa57_vector_cost): Update.
(exynosm1_advsimd_vector_cost): Define.
(exynosm1_vector_cost): Update.
(xgene1_advsimd_vector_cost): Define.
(xgene1_vector_cost): Update.
(thunderx2t99_advsimd_vector_cost): Define.
(thunderx2t99_vector_cost): Update.
(thunderx3t110_advsimd_vector_cost): Define.
(thunderx3t110_vector_cost): Update.
(aarch64_builtin_vectorization_cost): Handle sve and advsimd
vector cost fields.
gcc/config/aarch64/aarch64-protos.h
gcc/config/aarch64/aarch64.c