diff mbox

[obvious] Update comments for several vectorizator functions

Message ID 20160627154711.GB33785@msticlxl57.ims.intel.com
State New
Headers show

Commit Message

Ilya Enkovich June 27, 2016, 3:47 p.m. UTC
Hi,

This patch adds args description for some vectorizer functions.
I'm going to commit it to trunk.

Thanks,
Ilya
--
gcc/

2016-06-27  Ilya Enkovich  <ilya.enkovich@intel.com>

	* 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.
diff mbox

Patch

diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c
index fab5879..c26aa1d 100644
--- a/gcc/tree-vect-loop-manip.c
+++ b/gcc/tree-vect-loop-manip.c
@@ -1738,6 +1738,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).
 
@@ -2000,7 +2004,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,
@@ -2315,7 +2323,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 1146de9..41b9380 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -3384,7 +3384,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,