Hi all, 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.
Bootstrapped and tested on aarch64-none-linux-gnu. Pushing to the mainline. Thanks, Kyrill 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.
sve-cost.patch
Description: sve-cost.patch