summaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-17 08:09:02 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-17 08:09:02 +0000
commitca91d3f8410d9c31895c5b5d6ed511868dcfd455 (patch)
tree9edf96e0eafb060a1f8cca9c941d0213c5d5bffa /gcc/tree-vect-loop.c
parentf73446a2f19b48cef018853e1f0ffcfbb0f4d89b (diff)
downloadgcc-ca91d3f8410d9c31895c5b5d6ed511868dcfd455.tar.gz
2014-04-17 Richard Biener <rguenther@suse.de>
PR tree-optimization/60841 * tree-vect-data-refs.c (vect_analyze_data_refs): Count stmts. * tree-vect-loop.c (vect_analyze_loop_2): Pass down number of stmts to SLP build. * tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise. (vect_analyze_slp): Likewise. (vect_analyze_slp_instance): Likewise. (vect_build_slp_tree): Limit overall SLP tree growth. * tree-vectorizer.h (vect_analyze_data_refs, vect_analyze_slp): Adjust prototypes. * gcc.dg/vect/pr60841.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209467 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index def3bc46174..7ec079a8374 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -1629,6 +1629,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo)
int max_vf = MAX_VECTORIZATION_FACTOR;
int min_vf = 2;
unsigned int th;
+ unsigned int n_stmts = 0;
/* Find all data references in the loop (which correspond to vdefs/vuses)
and analyze their evolution in the loop. Also adjust the minimal
@@ -1637,7 +1638,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo)
FORNOW: Handle only simple, array references, which
alignment can be forced, and aligned pointer-references. */
- ok = vect_analyze_data_refs (loop_vinfo, NULL, &min_vf);
+ ok = vect_analyze_data_refs (loop_vinfo, NULL, &min_vf, &n_stmts);
if (!ok)
{
if (dump_enabled_p ())
@@ -1747,7 +1748,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo)
}
/* Check the SLP opportunities in the loop, analyze and build SLP trees. */
- ok = vect_analyze_slp (loop_vinfo, NULL);
+ ok = vect_analyze_slp (loop_vinfo, NULL, n_stmts);
if (ok)
{
/* Decide which possible SLP instances to SLP. */