-
- Downloads
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.
Showing
- gcc/config/loongarch/genopts/loongarch.opt.in 11 additions, 4 deletionsgcc/config/loongarch/genopts/loongarch.opt.in
- gcc/config/loongarch/loongarch.cc 159 additions, 14 deletionsgcc/config/loongarch/loongarch.cc
- gcc/config/loongarch/loongarch.opt 11 additions, 4 deletionsgcc/config/loongarch/loongarch.opt
- gcc/doc/invoke.texi 7 additions, 0 deletionsgcc/doc/invoke.texi
Loading
Please register or sign in to comment