[vect] Add main vectorized loop unrolling
authorAndre Vieira <andre.simoesdiasvieira@arm.com>
Tue, 18 Jan 2022 15:57:39 +0000 (15:57 +0000)
committerAndre Vieira <andre.simoesdiasvieira@arm.com>
Tue, 18 Jan 2022 16:23:23 +0000 (16:23 +0000)
commit7ca1582ca60dc84cc3fc46b9cda620e2a0bed1bb
treea196d384a55b73b1e8248ef4da31ebbb782e0cc2
parent254ada46ae0f21bd6f40314214f969f368328e22
[vect] Add main vectorized loop unrolling

gcc/ChangeLog:

* tree-vect-loop.cc (vect_estimate_min_profitable_iters): Pass new
argument suggested_unroll_factor.
(vect_analyze_loop_costing): Likewise.
(_loop_vec_info::_loop_vec_info): Initialize new member
suggested_unroll_factor.
(vect_determine_partial_vectors_and_peeling): Make epilogue of unrolled
main loop use partial vectors.
(vect_analyze_loop_2): Pass and use new argument
suggested_unroll_factor.
(vect_analyze_loop_1): Change to intialize local
suggested_unroll_factor and use it.
(vectorizable_reduction): Don't use single_defuse_cycle when unrolling.
* tree-vectorizer.h (_loop_vec_info::_loop_vec_info): Add new member
suggested_unroll_factor.
(vector_costs::vector_costs): Add new member m_suggested_unroll_factor.
(vector_costs::suggested_unroll_factor): New getter function.
(finish_cost): Set return argument suggested_unroll_factor.
gcc/tree-vect-loop.cc
gcc/tree-vectorizer.h