aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vectorizer.h
diff options
context:
space:
mode:
authorOlga Golovanevsky <olga@il.ibm.com>2004-10-14 17:21:35 +0000
committerDorit Nuzman <dorit@gcc.gnu.org>2004-10-14 17:21:35 +0000
commita023975e421f23fc2799a2c7fcc6e19ed68227f7 (patch)
treecf7a81b91a03469d3f5d1f4413db635fb27b33e9 /gcc/tree-vectorizer.h
parent7238c5ec254957652393d695e309be7ad8985451 (diff)
downloadgcc-a023975e421f23fc2799a2c7fcc6e19ed68227f7.zip
gcc-a023975e421f23fc2799a2c7fcc6e19ed68227f7.tar.gz
gcc-a023975e421f23fc2799a2c7fcc6e19ed68227f7.tar.bz2
2004-10-14 Olga Golovanevsky <olga@il.ibm.com>
* tree-vectorizer.c (vect_generate_tmps_on_preheader): (vect_update_ivs_after_vectorizer): (vect_transform_for_unknown_loop_bound): (tree_duplicate_loop_to_edge): (allocate_new_names): (rename_use_op): (rename_def_op): (rename_variables_in_bb): (free_new_names): (rename_variables_in_loop): (copy_phi_nodes): (update_phis_for_duplicate_loop): (update_phi_nodes_for_guard): (make_loop_iterate_ntimes): (tree_duplicate_loop_to_edge_cfg): (add_loop_guard): (vect_analyze_loop_with_symbolic_num_of_iters): (verify_loop_for_duplication): (vect_gen_niters_for_prolog_loop): (vect_update_niters_after_peeling): (vect_update_inits_of_dr): (vect_update_inits_of_drs): (vect_build_loop_niters): (vect_do_peeling_for_alignment): New functions. (vect_transform_loop): Add unknown and known but indivisible loop bound support; add peeling for unalignment support. (vect_analyze_loop_form): Support symbolic number of iterations. (vect_transform_loop_bound): New input parameter. (vect_get_loop_niters): Change input parameter type. (new_loop_vec_info): LOOP_VINFO_NITERS is tree now. (vectorizable_store): Allow unaligned access. (vectorize_loops): Add rewrite_into_loop_closed_ssa. (vect_analyze_data_refs_alignment): Allowed one unaligned store. * tree-vectorizer.h (LOOP_VINFO_NITERS_KNOWN_P): Redefined to use tree. (LOOP_VINFO_INT_NITERS): New macro. (MAX_NUMBER_OF_UNALIGNED_DATA_REFS): New define. (do_peeling_for_alignment): (unaligned_drs): New members of _loop_vec_info. (LOOP_DO_PEELING_FOR_ALIGNMENT): New macro. From-SVN: r89040
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r--gcc/tree-vectorizer.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h
index 37c5706..8ec9576 100644
--- a/gcc/tree-vectorizer.h
+++ b/gcc/tree-vectorizer.h
@@ -121,6 +121,7 @@ vinfo_for_stmt (tree stmt)
/* The misalignment of the memory access in bytes. */
#define DR_MISALIGNMENT(DR) (DR)->aux
+#define MAX_NUMBER_OF_UNALIGNED_DATA_REFS 1
static inline bool
aligned_access_p (struct data_reference *data_ref_info)
@@ -152,8 +153,8 @@ typedef struct _loop_vec_info {
/* The loop exit_condition. */
tree exit_cond;
- /* Number of iterations. -1 if unknown. */
- HOST_WIDE_INT num_iters;
+ /* Number of iterations. */
+ tree num_iters;
/* Is the loop vectorizable? */
bool vectorizable;
@@ -161,6 +162,13 @@ typedef struct _loop_vec_info {
/* Unrolling factor */
int vectorization_factor;
+ /* Unknown DRs according to which loop was peeled. */
+ struct data_reference *unaligned_drs [MAX_NUMBER_OF_UNALIGNED_DATA_REFS];
+
+ /* 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;
@@ -177,8 +185,14 @@ typedef struct _loop_vec_info {
#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_NITERS_KNOWN_P(L) ((L)->num_iters > 0)
+#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_UNALIGNED_DR(L, I) (L)->unaligned_drs[(I)]
+
+
+#define LOOP_VINFO_NITERS_KNOWN_P(L) \
+(host_integerp ((L)->num_iters,0) \
+&& TREE_INT_CST_LOW ((L)->num_iters) > 0)
/*-----------------------------------------------------------------*/
/* Function prototypes. */