]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Add vf_factor to aarch64_vec_op_count
authorRichard Sandiford <richard.sandiford@arm.com>
Fri, 12 Nov 2021 17:33:02 +0000 (17:33 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Fri, 12 Nov 2021 17:33:02 +0000 (17:33 +0000)
commit2e1886ea0649885819495bbee4cfc8e004beffc5
treeecf2e2329fe985eb4213d5d9bb32f79c5d53c091
parenta82ffd436193d97b0b47441f540e61001f16a682
aarch64: Add vf_factor to aarch64_vec_op_count

-mtune=neoverse-512tvb sets the likely SVE vector length to 128 bits,
but it also takes into account Neoverse V1, which is a 256-bit target.
This patch adds this VF (VL) factor to aarch64_vec_op_count.

gcc/
* config/aarch64/aarch64.c (aarch64_vec_op_count::m_vf_factor):
New member variable.
(aarch64_vec_op_count::aarch64_vec_op_count): Add a parameter for it.
(aarch64_vec_op_count::vf_factor): New function.
(aarch64_vector_costs::aarch64_vector_costs): When costing for
neoverse-512tvb, pass a vf_factor of 2 for the Neoverse V1 version
of an SVE loop.
(aarch64_vector_costs::adjust_body_cost): Read the vf factor
instead of hard-coding 2.
gcc/config/aarch64/aarch64.c