diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2021-03-26 16:08:32 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2021-03-26 16:08:32 +0000 |
commit | 7c679969bac9b7ae5e9446bfaa5466e19063d690 (patch) | |
tree | 667828ec4157edded0b696f774f07e9d2ad4a02c /gcc/lra-constraints.c | |
parent | d1ff0847b2df6ad21f77e26e7e516643c5aa7d40 (diff) | |
download | gcc-7c679969bac9b7ae5e9446bfaa5466e19063d690.zip gcc-7c679969bac9b7ae5e9446bfaa5466e19063d690.tar.gz gcc-7c679969bac9b7ae5e9446bfaa5466e19063d690.tar.bz2 |
aarch64: Add costs for one element of a scatter store
Currently each element in a gather load is costed as a scalar_load
and each element in a scatter store is costed as a scalar_store.
The load side seems to work pretty well in practice, since many
CPU-specific costs give loads quite a high cost relative to
arithmetic operations. However, stores usually have a cost
of just 1, which means that scatters tend to appear too cheap.
This patch adds a separate cost for one element in a scatter store.
Like with the previous patches, this one only becomes active if
a CPU selects use_new_vector_costs. It should therefore have
a very low impact on other CPUs.
gcc/
* config/aarch64/aarch64-protos.h
(sve_vec_cost::scatter_store_elt_cost): New member variable.
* config/aarch64/aarch64.c (generic_sve_vector_cost): Update
accordingly, taking the cost from the cost of a scalar_store.
(a64fx_sve_vector_cost): Likewise.
(aarch64_detect_vector_stmt_subtype): Detect scatter stores.
Diffstat (limited to 'gcc/lra-constraints.c')
0 files changed, 0 insertions, 0 deletions