aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorKeith Besaw <kbesaw@us.ibm.com>2005-09-06 10:59:58 +0000
committerIra Rosen <irar@gcc.gnu.org>2005-09-06 10:59:58 +0000
commitc12cc93047bf59f210231a102df277dad6ad2ab1 (patch)
treed212aa353f9a4c74483a300139b763af6e6840f7 /gcc/tree-vectorizer.h
parent4fe8db686f069d34fa01cb98668163823cc38d04 (diff)
downloadgcc-c12cc93047bf59f210231a102df277dad6ad2ab1.zip
gcc-c12cc93047bf59f210231a102df277dad6ad2ab1.tar.gz
gcc-c12cc93047bf59f210231a102df277dad6ad2ab1.tar.bz2
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.h')
-rw-r--r--gcc/tree-vectorizer.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index be42b96..4f7fd95 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -117,28 +117,37 @@ typedef struct _loop_vec_info {
unaligned_dr. */
int peeling_for_alignment;
+ /* The mask used to check the alignment of pointers or arrays. */
+ int ptr_mask;
+
/* All data references in the loop. */
varray_type datarefs;
/* All data dependences in the loop. */
varray_type ddrs;
+ /* Statements in the loop that have data references that are candidates for a
+ runtime (loop versioning) misalignment check. */
+ VEC(tree,heap) *may_misalign_stmts;
+
/* The loop location in the source. */
LOC loop_line_number;
} *loop_vec_info;
- /* Access Functions. */
+/* Access Functions. */
#define LOOP_VINFO_LOOP(L) (L)->loop
#define LOOP_VINFO_BBS(L) (L)->bbs
#define LOOP_VINFO_EXIT_COND(L) (L)->exit_cond
#define LOOP_VINFO_NITERS(L) (L)->num_iters
#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
#define LOOP_VINFO_DATAREFS(L) (L)->datarefs
#define LOOP_VINFO_DDRS(L) (L)->ddrs
#define LOOP_VINFO_INT_NITERS(L) (TREE_INT_CST_LOW ((L)->num_iters))
#define LOOP_PEELING_FOR_ALIGNMENT(L) (L)->peeling_for_alignment
#define LOOP_VINFO_UNALIGNED_DR(L) (L)->unaligned_dr
+#define LOOP_VINFO_MAY_MISALIGN_STMTS(L) (L)->may_misalign_stmts
#define LOOP_VINFO_LOC(L) (L)->loop_line_number
#define LOOP_VINFO_NITERS_KNOWN_P(L) \