diff options
author | Keith Besaw <kbesaw@us.ibm.com> | 2005-09-06 10:59:58 +0000 |
---|---|---|
committer | Ira Rosen <irar@gcc.gnu.org> | 2005-09-06 10:59:58 +0000 |
commit | c12cc93047bf59f210231a102df277dad6ad2ab1 (patch) | |
tree | d212aa353f9a4c74483a300139b763af6e6840f7 /gcc/tree-vectorizer.c | |
parent | 4fe8db686f069d34fa01cb98668163823cc38d04 (diff) | |
download | gcc-c12cc93047bf59f210231a102df277dad6ad2ab1.tar.gz |
common.opt: Add option ftree-vect-loop-version.
* common.opt: Add option ftree-vect-loop-version.
* params.def: Add --param vect-max-version-checks.
* doc/invoke.texi: Document ftree-vect-loop-version and
--param vect-max-version-checks.
* tree-vectorizer.h (_loop_vec_info): Add ptr_mask and
may_misalign_stmts and defines for accessors.
* tree-vectorizer.c : (new_loop_vec_info): VEC_alloc for
LOOP_VINFO_MAY_MISALIGN_STMTS.
(destroy_loop_vec_info): VEC_free for
LOOP_VINFO_MAY_MISALIGN_STMTS.
* tree-vect-analyze.c (vect_compute_data_ref_alignment):
Update documentation.
(vect_update_misalignment_for_peel): New.
(vect_enhance_data_refs_alignment): Update to choose loop
peeling or loop versioning if appropriate for the (potentially)
unaligned data references in the loop.
(vect_analyze_data_refs_alignment): Remove call to
vect_enhance_data_refs_alignment so the checks can be done
earlier.
(vect_analyze_loop): Add call to vect_enhance_data_refs_alignment
and move up call to vect_analyze_data_refs_alignment.
* tree-vect-transform.c (vect_create_cond_for_align_checks): New.
(vect_transform_loop): Add call to loop_version.
From-SVN: r103941
Diffstat (limited to 'gcc/tree-vectorizer.c')
-rw-r--r-- | gcc/tree-vectorizer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index 84ed5a90c3b..1e415cb9dd9 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -137,6 +137,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA #include "cfglayout.h" #include "expr.h" #include "optabs.h" +#include "params.h" #include "toplev.h" #include "tree-chrec.h" #include "tree-data-ref.h" @@ -1420,6 +1421,8 @@ new_loop_vec_info (struct loop *loop) VARRAY_GENERIC_PTR_INIT (LOOP_VINFO_DATAREFS (res), 20, "loop_datarefs"); VARRAY_GENERIC_PTR_INIT (LOOP_VINFO_DDRS (res), 20, "loop_ddrs"); LOOP_VINFO_UNALIGNED_DR (res) = NULL; + LOOP_VINFO_MAY_MISALIGN_STMTS (res) + = VEC_alloc (tree, heap, PARAM_VALUE (PARAM_VECT_MAX_VERSION_CHECKS)); return res; } @@ -1480,6 +1483,7 @@ destroy_loop_vec_info (loop_vec_info loop_vinfo) free (LOOP_VINFO_BBS (loop_vinfo)); varray_clear (LOOP_VINFO_DATAREFS (loop_vinfo)); varray_clear (LOOP_VINFO_DDRS (loop_vinfo)); + VEC_free (tree, heap, LOOP_VINFO_MAY_MISALIGN_STMTS (loop_vinfo)); free (loop_vinfo); } @@ -2049,7 +2053,7 @@ vectorize_loops (struct loops *loops) if (!loop_vinfo || !LOOP_VINFO_VECTORIZABLE_P (loop_vinfo)) continue; - vect_transform_loop (loop_vinfo, loops); + vect_transform_loop (loop_vinfo, loops); num_vectorized_loops++; } |