diff options
author | Jiahao Xu <xujiahao@loongson.cn> | 2023-10-18 17:43:39 +0800 |
---|---|---|
committer | Lulu Cheng <chenglulu@loongson.cn> | 2023-10-19 14:15:38 +0800 |
commit | 8f4bbdc28df6e87a7ad5ec5ca191a7a836a4f016 (patch) | |
tree | 78f5e527e192d3b58587660c8bcd7f17629826e6 /gcc/tree-vect-loop-manip.cc | |
parent | 08813894fd85c981772be1c274471d3d3241c9cb (diff) | |
download | gcc-8f4bbdc28df6e87a7ad5ec5ca191a7a836a4f016.zip gcc-8f4bbdc28df6e87a7ad5ec5ca191a7a836a4f016.tar.gz gcc-8f4bbdc28df6e87a7ad5ec5ca191a7a836a4f016.tar.bz2 |
LoongArch:Implement the new vector cost model framework.
This patch make loongarch use the new vector hooks and implements the costing
function determine_suggested_unroll_factor, to make it be able to suggest the
unroll factor for a given loop being vectorized base vec_ops analysis during
vector costing and the available issue information. Referring to aarch64 and
rs6000 port.
The patch also reduces the cost of unaligned stores, making it equal to the
cost of aligned ones in order to avoid odd alignment peeling.
gcc/ChangeLog:
* config/loongarch/loongarch.cc (loongarch_vector_costs): Inherit from
vector_costs. Add a constructor.
(loongarch_vector_costs::add_stmt_cost): Use adjust_cost_for_freq to
adjust the cost for inner loops.
(loongarch_vector_costs::count_operations): New function.
(loongarch_vector_costs::determine_suggested_unroll_factor): Ditto.
(loongarch_vector_costs::finish_cost): Ditto.
(loongarch_builtin_vectorization_cost): Adjust.
* config/loongarch/loongarch.opt (loongarch-vect-unroll-limit): New parameter.
(loongarcg-vect-issue-info): Ditto.
(mmemvec-cost): Delete.
* config/loongarch/genopts/loongarch.opt.in
(loongarch-vect-unroll-limit): Ditto.
(loongarcg-vect-issue-info): Ditto.
(mmemvec-cost): Delete.
* doc/invoke.texi (loongarcg-vect-unroll-limit): Document new option.
Diffstat (limited to 'gcc/tree-vect-loop-manip.cc')
0 files changed, 0 insertions, 0 deletions