aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-03-21 12:45:04 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-03-21 12:45:04 +0000
commit5abe1e053f1b9a685aa6f5505db367f2cad790d0 (patch)
tree84e4ad879190f0b64f86ed7410a8243bd1629036 /gcc/tree-vect-loop.c
parentbd059b265f8adbe9a45995118356d7d623a268f5 (diff)
downloadgcc-5abe1e053f1b9a685aa6f5505db367f2cad790d0.zip
gcc-5abe1e053f1b9a685aa6f5505db367f2cad790d0.tar.gz
gcc-5abe1e053f1b9a685aa6f5505db367f2cad790d0.tar.bz2
tree-vect-data-refs.c (vect_update_interleaving_chain): Remove.
2013-03-21 Richard Biener <rguenther@suse.de> * tree-vect-data-refs.c (vect_update_interleaving_chain): Remove. (vect_insert_into_interleaving_chain): Likewise. (vect_drs_dependent_in_basic_block): Inline ... (vect_slp_analyze_data_ref_dependence): ... here. New function, split out from ... (vect_analyze_data_ref_dependence): ... here. Simplify. (vect_check_interleaving): Simplify. (vect_analyze_data_ref_dependences): Likewise. Split out ... (vect_slp_analyze_data_ref_dependences): ... this new function. (dr_group_sort_cmp): New function. (vect_analyze_data_ref_accesses): Compute data-reference groups here instead of in vect_analyze_data_ref_dependence. Use a more efficient algorithm. * tree-vect-slp.c (vect_slp_analyze_bb_1): Use vect_slp_analyze_data_ref_dependences. Call vect_analyze_data_ref_accesses earlier. * tree-vect-loop.c (vect_analyze_loop_2): Likewise. * tree-vectorizer.h (vect_analyze_data_ref_dependences): Adjust. (vect_slp_analyze_data_ref_dependences): New prototype. * gcc.dg/vect/vect-outer-3a-big-array.c: Adjust. * gcc.dg/vect/vect-outer-3a.c: Likewise. From-SVN: r196872
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r--gcc/tree-vect-loop.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index b7c5521..542082f 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -1589,6 +1589,18 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo)
return false;
}
+ /* Analyze the access patterns of the data-refs in the loop (consecutive,
+ complex, etc.). FORNOW: Only handle consecutive access pattern. */
+
+ ok = vect_analyze_data_ref_accesses (loop_vinfo, NULL);
+ if (!ok)
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "bad data access.");
+ return false;
+ }
+
/* Classify all cross-iteration scalar data-flow cycles.
Cross-iteration cycles caused by virtual phis are analyzed separately. */
@@ -1612,7 +1624,7 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo)
the dependences.
FORNOW: fail at the first data dependence that we encounter. */
- ok = vect_analyze_data_ref_dependences (loop_vinfo, NULL, &max_vf);
+ ok = vect_analyze_data_ref_dependences (loop_vinfo, &max_vf);
if (!ok
|| max_vf < min_vf)
{
@@ -1650,18 +1662,6 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo)
return false;
}
- /* Analyze the access patterns of the data-refs in the loop (consecutive,
- complex, etc.). FORNOW: Only handle consecutive access pattern. */
-
- ok = vect_analyze_data_ref_accesses (loop_vinfo, NULL);
- if (!ok)
- {
- if (dump_enabled_p ())
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "bad data access.");
- return false;
- }
-
/* Prune the list of ddrs to be tested at run-time by versioning for alias.
It is important to call pruning after vect_analyze_data_ref_accesses,
since we use grouping information gathered by interleaving analysis. */