From 25e3c2e84712f5e71dc9a9a8a5bee33faa0871c6 Mon Sep 17 00:00:00 2001 From: irar Date: Tue, 6 Sep 2005 10:59:58 +0000 Subject: * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103941 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-vectorizer.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gcc/tree-vectorizer.h') diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index be42b96dcba..4f7fd951d6d 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) \ -- cgit v1.2.3