]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Use new hooks for vector comparisons
authorRichard Sandiford <richard.sandiford@arm.com>
Fri, 12 Nov 2021 17:33:03 +0000 (17:33 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Fri, 12 Nov 2021 17:33:03 +0000 (17:33 +0000)
commitc6c5c5ebaee4e7aa99289ae63cabb2d05d9aee00
treec7627f95923793b9d05fa21eb821f46f8448952c
parent2e1886ea0649885819495bbee4cfc8e004beffc5
aarch64: Use new hooks for vector comparisons

Previously we tried to account for the different issue rates of
the various vector modes by guessing what the Advanced SIMD version
of an SVE loop would look like and what its issue rate was likely to be.
We'd then increase the cost of the SVE loop if the Advanced SIMD loop
might issue more quickly.

This patch moves that logic to better_main_loop_than_p, so that we
can compare loops side-by-side rather than having to guess.  This also
means we can apply the issue rate heuristics to *any* vector loop
comparison, rather than just weighting SVE vs. Advanced SIMD.

The actual heuristics are otherwise unchanged.  We're just
applying them in a different place.

gcc/
* config/aarch64/aarch64.c (aarch64_vector_costs::m_saw_sve_only_op)
(aarch64_sve_only_stmt_p): Delete.
(aarch64_vector_costs::prefer_unrolled_loop): New function,
extracted from adjust_body_cost.
(aarch64_vector_costs::better_main_loop_than_p): New function,
using heuristics extracted from adjust_body_cost and
adjust_body_cost_sve.
(aarch64_vector_costs::adjust_body_cost_sve): Remove
advsimd_cycles_per_iter and could_use_advsimd parameters.
Update after changes above.
(aarch64_vector_costs::adjust_body_cost): Update after changes above.
gcc/config/aarch64/aarch64.c