From d9157f1514cb8f9e64e4b57c5461a9bb9b03427f Mon Sep 17 00:00:00 2001 From: Ilya Enkovich Date: Tue, 19 Jul 2016 10:04:02 +0000 Subject: [PATCH] tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Update comment. gcc/ * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Update comment. (vect_update_inits_of_drs): Likewise. (vect_create_cond_for_alias_checks): Likewise. * tree-vect-loop.c (vect_get_known_peeling_cost): Likewise. From-SVN: r238466 --- gcc/ChangeLog | 8 ++++++++ gcc/tree-vect-loop-manip.c | 12 ++++++++++-- gcc/tree-vect-loop.c | 10 +++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bff71602ecf..43890647f3b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2016-07-19 Ilya Enkovich + + * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Update + comment. + (vect_update_inits_of_drs): Likewise. + (vect_create_cond_for_alias_checks): Likewise. + * tree-vect-loop.c (vect_get_known_peeling_cost): Likewise. + 2016-07-19 Richard Biener PR lto/71907 diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index 93b29b72fd5..819abcda81a 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -1735,6 +1735,10 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters, iterates NITERS times, the new epilog loop iterates NITERS % VECTORIZATION_FACTOR times. + If CHECK_PROFITABILITY is 1 then profitability check is generated + using TH as a cost model profitability threshold of iterations for + vectorization. + The original loop will later be made to iterate NITERS / VECTORIZATION_FACTOR times (this value is placed into RATIO). @@ -1993,7 +1997,11 @@ vect_update_inits_of_drs (loop_vec_info loop_vinfo, tree niters) 'niters' is set to the misalignment of one of the data references in the loop, thereby forcing it to refer to an aligned location at the beginning of the execution of this loop. The data reference for which we are - peeling is recorded in LOOP_VINFO_UNALIGNED_DR. */ + peeling is recorded in LOOP_VINFO_UNALIGNED_DR. + + If CHECK_PROFITABILITY is 1 then profitability check is generated + using TH as a cost model profitability threshold of iterations for + vectorization. */ void vect_do_peeling_for_alignment (loop_vec_info loop_vinfo, tree ni_name, @@ -2313,7 +2321,7 @@ vect_create_cond_for_alias_checks (loop_vec_info loop_vinfo, tree * cond_expr) The test generated to check which version of loop is executed is modified to also check for profitability as indicated by the - cost model initially. + cost model threshold TH. The versioning precondition(s) are placed in *COND_EXPR and *COND_EXPR_STMT_LIST. */ diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 11863af66fc..2a7e0c6661b 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -3065,7 +3065,15 @@ vect_get_known_peeling_cost (loop_vec_info loop_vinfo, int peel_iters_prologue, Return the number of iterations required for the vector version of the loop to be profitable relative to the cost of the scalar version of the - loop. */ + loop. + + *RET_MIN_PROFITABLE_NITERS is a cost model profitability threshold + of iterations for vectorization. -1 value means loop vectorization + is not profitable. This returned value may be used for dynamic + profitability check. + + *RET_MIN_PROFITABLE_ESTIMATE is a profitability threshold to be used + for static check against estimated number of iterations. */ static void vect_estimate_min_profitable_iters (loop_vec_info loop_vinfo, -- 2.30.2