aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorCong Hou <congh@google.com>2014-04-03 19:05:42 -0400
committerCong Hou <congh@gcc.gnu.org>2014-04-03 19:05:42 -0400
commit090cd8dc70b80183c83d9f43f1e6ab9970481efd (patch)
tree922c68d13315da3b6382d88c5012433e5c2649bc /gcc/tree-vectorizer.h
parentbdc67fd6a4576a1867bb0af8cd47aa819da6e2b3 (diff)
downloadgcc-090cd8dc70b80183c83d9f43f1e6ab9970481efd.zip
gcc-090cd8dc70b80183c83d9f43f1e6ab9970481efd.tar.gz
gcc-090cd8dc70b80183c83d9f43f1e6ab9970481efd.tar.bz2
re PR tree-optimization/60505 (Warning caused by GCC vectorizer.)
2014-04-03 Cong Hou <congh@google.com> PR tree-optimization/60505 * tree-vectorizer.h (struct _stmt_vec_info): Add th field as the threshold of number of iterations below which no vectorization will be done. * tree-vect-loop.c (new_loop_vec_info): Initialize LOOP_VINFO_COST_MODEL_THRESHOLD. * tree-vect-loop.c (vect_analyze_loop_operations): Set LOOP_VINFO_COST_MODEL_THRESHOLD. * tree-vect-loop.c (vect_transform_loop): Use LOOP_VINFO_COST_MODEL_THRESHOLD. * tree-vect-loop.c (vect_analyze_loop_2): Check the maximum number of iterations of the loop and see if we should build the epilogue. 2014-04-03 Cong Hou <congh@google.com> PR tree-optimization/60505 * gcc.dg/vect/pr60505.c: New test. From-SVN: r209065
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index f8efe47..f2087e2 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -264,6 +264,11 @@ typedef struct _loop_vec_info {
values unknown at compile time. */
int min_profitable_iters;
+ /* Threshold of number of iterations below which vectorzation will not be
+ performed. It is calculated from MIN_PROFITABLE_ITERS and
+ PARAM_MIN_VECT_LOOP_BOUND. */
+ unsigned int th;
+
/* Is the loop vectorizable? */
bool vectorizable;
@@ -382,6 +387,7 @@ typedef struct _loop_vec_info {
cost model. */
#define LOOP_VINFO_NITERS_UNCHANGED(L) (L)->num_iters_unchanged
#define LOOP_VINFO_COST_MODEL_MIN_ITERS(L) (L)->min_profitable_iters
+#define LOOP_VINFO_COST_MODEL_THRESHOLD(L) (L)->th
#define LOOP_VINFO_VECTORIZABLE_P(L) (L)->vectorizable
#define LOOP_VINFO_VECT_FACTOR(L) (L)->vectorization_factor
#define LOOP_VINFO_PTR_MASK(L) (L)->ptr_mask