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.
parent
2e1886ea
Please register or sign in to comment