aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorLeehod Baruch <leehod@il.ibm.com>2005-02-03 16:13:17 +0000
committerDorit Nuzman <dorit@gcc.gnu.org>2005-02-03 16:13:17 +0000
commitef302293136af29f6b167bb87f647fca3d423767 (patch)
tree9f3b1a7826708c1a82d8e59891c32e838223bd48 /gcc/tree-vectorizer.h
parent9df935d878e5d92552ba1cb2b1ceacecef69f53f (diff)
downloadgcc-ef302293136af29f6b167bb87f647fca3d423767.zip
gcc-ef302293136af29f6b167bb87f647fca3d423767.tar.gz
gcc-ef302293136af29f6b167bb87f647fca3d423767.tar.bz2
tree-vectorizer.c (vect_analyze_data_ref_dependence): Function declaration added.
* tree-vectorizer.c (vect_analyze_data_ref_dependence): Function declaration added. (vect_analyze_data_ref_dependences): Likewise. (vect_is_simple_use): Argument changed from loop structure to loop_vect_info structure. (vect_can_advance_ivs_p): Likewise. (vect_create_index_for_vector_ref): Likewise. (vect_update_ivs_after_vectorizer): Likewise. (new_stmt_vec_info): Likewise. (new_loop_vec_info): Second argument in call to new_stmt_vec_info was changed from loop to loop_vinfo. (vect_create_data_ref_ptr): First argument in call to vect_create_index_for_vector_ref was changed from loop to loop_vinfo. (vectorizable_assignment): Second argument in call to vect_is_simple_use was changed from loop to loop_vinfo. (vectorizable_operation): Likewise. (vectorizable_store): Likewise. (vect_mark_stmts_to_be_vectorized): Likewise. (vect_do_peeling_for_loop_bound): First argument in call to vect_update_ivs_after_vectorizer was changed from loop to loop_vinfo. (vect_analyze_operations): Argument in call to vect_can_advance_ivs_p was changed from loop to loop_vinfo. (vect_analyze_data_ref_dependences): Third argument in call to vect_analyze_data_ref_dependence was changed from loop to loop_vinfo. (vect_create_index_for_vector_ref): Get the loop from loop_vinfo. (vect_create_data_ref_ptr): Likewise. (vect_init_vector): Likewise. (vect_get_vec_def_for_operand): Likewise. (vectorizable_assignment): Likewise. (vectorizable_operation): Likewise. (vectorizable_store): Likewise. (vectorizable_load): Likewise. (vect_update_ivs_after_vectorizer): Likewise. (vect_is_simple_use): Likewise. (vect_analyze_data_ref_dependence): Likewise. (vect_analyze_pointer_ref_access): Likewise. (vect_can_advance_ivs_p): Likewise. * tree-vectorizer.h: (_loop_vec_info): Definition and macros moved before _stmt_vec_info. (_stmt_vec_info): Loop field replaced by loop_vec_info. (STMT_VINFO_LOOP): Replaced with STMT_VINFO_LOOP_VINFO. (new_stmt_vec_info): Argument changed from loop structure to loop_vect_info structure (vect_analyze_data_ref_dependences): Unnecessary line was removed. (vect_analyze_offset_expr): Avoid 80 columns overflow. (vect_create_addr_base_for_vector_ref): Likewise. (vect_analyze_pointer_ref_access): Likewise. Co-Authored-By: Dorit Naishlos <dorit@il.ibm.com> From-SVN: r94661
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h119
1 files changed, 60 insertions, 59 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 642e384..4b893e6 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -43,6 +43,62 @@ enum dr_alignment_support {
};
/*-----------------------------------------------------------------*/
+/* Info on vectorized loops. */
+/*-----------------------------------------------------------------*/
+typedef struct _loop_vec_info {
+
+ /* The loop to which this info struct refers to. */
+ struct loop *loop;
+
+ /* The loop basic blocks. */
+ basic_block *bbs;
+
+ /* The loop exit_condition. */
+ tree exit_cond;
+
+ /* Number of iterations. */
+ tree num_iters;
+
+ /* Is the loop vectorizable? */
+ bool vectorizable;
+
+ /* Unrolling factor */
+ int vectorization_factor;
+
+ /* Unknown DRs according to which loop was peeled. */
+ struct data_reference *unaligned_dr;
+
+ /* If true, loop is peeled.
+ unaligned_drs show in this case DRs used for peeling. */
+ bool do_peeling_for_alignment;
+
+ /* All data references in the loop that are being written to. */
+ varray_type data_ref_writes;
+
+ /* All data references in the loop that are being read from. */
+ varray_type data_ref_reads;
+
+} *loop_vec_info;
+
+/* 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_DATAREF_WRITES(L) (L)->data_ref_writes
+#define LOOP_VINFO_DATAREF_READS(L) (L)->data_ref_reads
+#define LOOP_VINFO_INT_NITERS(L) (TREE_INT_CST_LOW ((L)->num_iters))
+#define LOOP_DO_PEELING_FOR_ALIGNMENT(L) (L)->do_peeling_for_alignment
+#define LOOP_VINFO_UNALIGNED_DR(L) (L)->unaligned_dr
+
+
+#define LOOP_VINFO_NITERS_KNOWN_P(L) \
+(host_integerp ((L)->num_iters,0) \
+&& TREE_INT_CST_LOW ((L)->num_iters) > 0)
+
+/*-----------------------------------------------------------------*/
/* Info on vectorized defs. */
/*-----------------------------------------------------------------*/
enum stmt_vec_info_type {
@@ -60,8 +116,8 @@ typedef struct _stmt_vec_info {
/* The stmt to which this info struct refers to. */
tree stmt;
- /* The loop with respect to which STMT is vectorized. */
- struct loop *loop;
+ /* The loop_vec_info with respect to which STMT is vectorized. */
+ loop_vec_info loop_vinfo;
/* Not all stmts in the loop need to be vectorized. e.g, the incrementation
of the loop induction variable and computation of array indexes. relevant
@@ -114,7 +170,7 @@ typedef struct _stmt_vec_info {
/* Access Functions. */
#define STMT_VINFO_TYPE(S) (S)->type
#define STMT_VINFO_STMT(S) (S)->stmt
-#define STMT_VINFO_LOOP(S) (S)->loop
+#define STMT_VINFO_LOOP_VINFO(S) (S)->loop_vinfo
#define STMT_VINFO_RELEVANT_P(S) (S)->relevant
#define STMT_VINFO_VECTYPE(S) (S)->vectype
#define STMT_VINFO_VEC_STMT(S) (S)->vectorized_stmt
@@ -167,61 +223,6 @@ unknown_alignment_for_access_p (struct data_reference *data_ref_info)
/*-----------------------------------------------------------------*/
-/* Info on vectorized loops. */
-/*-----------------------------------------------------------------*/
-typedef struct _loop_vec_info {
-
- /* The loop to which this info struct refers to. */
- struct loop *loop;
-
- /* The loop basic blocks. */
- basic_block *bbs;
-
- /* The loop exit_condition. */
- tree exit_cond;
-
- /* Number of iterations. */
- tree num_iters;
-
- /* Is the loop vectorizable? */
- bool vectorizable;
-
- /* Unrolling factor */
- int vectorization_factor;
-
- /* Unknown DRs according to which loop was peeled. */
- struct data_reference *unaligned_dr;
-
- /* If true, loop is peeled.
- unaligned_drs show in this case DRs used for peeling. */
- bool do_peeling_for_alignment;
-
- /* All data references in the loop that are being written to. */
- varray_type data_ref_writes;
-
- /* All data references in the loop that are being read from. */
- varray_type data_ref_reads;
-} *loop_vec_info;
-
-/* 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_DATAREF_WRITES(L) (L)->data_ref_writes
-#define LOOP_VINFO_DATAREF_READS(L) (L)->data_ref_reads
-#define LOOP_VINFO_INT_NITERS(L) (TREE_INT_CST_LOW ((L)->num_iters))
-#define LOOP_DO_PEELING_FOR_ALIGNMENT(L) (L)->do_peeling_for_alignment
-#define LOOP_VINFO_UNALIGNED_DR(L) (L)->unaligned_dr
-
-
-#define LOOP_VINFO_NITERS_KNOWN_P(L) \
-(host_integerp ((L)->num_iters,0) \
-&& TREE_INT_CST_LOW ((L)->num_iters) > 0)
-
-/*-----------------------------------------------------------------*/
/* Function prototypes. */
/*-----------------------------------------------------------------*/
@@ -231,6 +232,6 @@ extern void vectorize_loops (struct loops *);
/* creation and deletion of loop and stmt info structs. */
extern loop_vec_info new_loop_vec_info (struct loop *loop);
extern void destroy_loop_vec_info (loop_vec_info);
-extern stmt_vec_info new_stmt_vec_info (tree stmt, struct loop *loop);
+extern stmt_vec_info new_stmt_vec_info (tree stmt, loop_vec_info);
#endif /* GCC_TREE_VECTORIZER_H */