]> git.ipfire.org Git - thirdparty/gcc.git/commit
aarch64: Fold aarch64_sve_op_count into aarch64_vec_op_count
authorRichard Sandiford <richard.sandiford@arm.com>
Fri, 12 Nov 2021 17:33:00 +0000 (17:33 +0000)
committerRichard Sandiford <richard.sandiford@arm.com>
Fri, 12 Nov 2021 17:33:00 +0000 (17:33 +0000)
commit15aba5a67c61a005497ddad766377889d2442df6
tree10e222abf722d8431394674e1d0bea3a39a23319
parent526e1639aa76b0a8496b0dc3a3ff2c450229544e
aarch64: Fold aarch64_sve_op_count into aarch64_vec_op_count

Later patches make aarch64 use the new vector hooks.  We then
only need to track one set of ops for each aarch64_vector_costs
structure.  This in turn means that it's more convenient to merge
aarch64_sve_op_count and aarch64_vec_op_count.

The patch also adds issue info and vec flags to aarch64_vec_op_count,
so that the structure is more self-descriptive.  This simplifies some
things later.

gcc/
* config/aarch64/aarch64.c (aarch64_sve_op_count): Fold into...
(aarch64_vec_op_count): ...this.  Add a constructor.
(aarch64_vec_op_count::vec_flags): New function.
(aarch64_vec_op_count::base_issue_info): Likewise.
(aarch64_vec_op_count::simd_issue_info): Likewise.
(aarch64_vec_op_count::sve_issue_info): Likewise.
(aarch64_vec_op_count::m_issue_info): New member variable.
(aarch64_vec_op_count::m_vec_flags): Likewise.
(aarch64_vector_costs): Add a constructor.
(aarch64_vector_costs::m_sve_ops): Change type to aarch64_vec_op_count.
(aarch64_vector_costs::aarch64_vector_costs): New function.
Initialize m_scalar_ops, m_advsimd_ops and m_sve_ops.
(aarch64_vector_costs::count_ops): Remove vec_flags and
issue_info parameters, using the new aarch64_vec_op_count
functions instead.
(aarch64_vector_costs::add_stmt_cost): Update call accordingly.
(aarch64_sve_op_count::dump): Fold into...
(aarch64_vec_op_count::dump): ..here.
gcc/config/aarch64/aarch64.c