diff options
author | dorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-19 18:01:51 +0000 |
---|---|---|
committer | dorit <dorit@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-09-19 18:01:51 +0000 |
commit | 9ce81338320f5a7e7df4a3c0179f2d4d8b12fd1f (patch) | |
tree | f964f19e04649f4ccaa0fd898211cec33894eb32 /gcc/tree-vectorizer.h | |
parent | 615dd397c37bcd1d50f3b13227eb2fb4f2edb237 (diff) | |
download | gcc-9ce81338320f5a7e7df4a3c0179f2d4d8b12fd1f.tar.gz |
2004-09-19 Ira Rosen <irar@il.ibm.com>
* tree-vectorizer.h (stmt_vec_info): Add vect_dr_base field.
(STMT_VINFO_VECT_DR_BASE): Declare.
(VECT_SMODULO): Declare.
* tree-vectorizer.c (vect_compute_array_ref_alignment): New function.
(vect_compute_array_base_alignment): New function.
(vect_analyze_data_ref_access): Check array indices. Remove one
dimensional arrays restriction.
(vect_get_ptr_offset): New function.
(vect_get_symbl_and_dr): New function.
(vect_get_base_and_bit_offset): Support additional data refs. Renamed
(former name vect_get_base_decl_and_bit_offset).
(vect_create_index_for_array_ref): Removed.
(vect_create_index_for_vector_ref): New function.
(vect_create_addr_base_for_vector_ref): New function.
(vect_create_data_ref): Handle additional data refs. Call
vect_create_index_for_vector_ref and vect_create_addr_base_for_vector_ref.
(vect_compute_data_ref_alignment): Support the changes. Call
vect_get_base_and_bit_offset.
(vect_analyze_data_refs): Call vect_get_symbl_and_dr. Support additional
data refs. Store vect_dr_base.
(vect_analyze_data_ref_accesses): Support nonconstant init.
(new_stmt_vec_info): Initialize vect_dr_base field.
(vect_is_simple_iv_evolution): Call initial_condition_in_loop_num.
(get_vectype_for_scalar_type): Check for BLKmode.
* tree-chrec.h (initial_condition_in_loop_num): Declare.
* tree-chrec.c (initial_condition_in_loop_num): New function.
(chrec_component_in_loop_num): New function.
(evolution_part_in_loop_num): Call chrec_component_in_loop_num.
* tree-data-ref.c (analyze_array_indexes): Change parameter (access_fns)
to be pointer to varray_type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87731 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vectorizer.h')
-rw-r--r-- | gcc/tree-vectorizer.h | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index eb8a5868a77..405ecb24df2 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -76,17 +76,27 @@ typedef struct _stmt_vec_info { /* Aliasing information. */ tree memtag; + + /* Data reference base. This field holds the entire invariant part of the + data-reference (with respect to the relevant loop), as opposed to the + field DR_BASE of the STMT_VINFO_DATA_REF struct, which holds only the + initial base; e.g: + REF BR_BASE VECT_DR_BASE + a[i] a a + a[i][j] a a[i] */ + tree vect_dr_base; } *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_RELEVANT_P(S) (S)->relevant -#define STMT_VINFO_VECTYPE(S) (S)->vectype -#define STMT_VINFO_VEC_STMT(S) (S)->vectorized_stmt -#define STMT_VINFO_DATA_REF(S) (S)->data_ref_info -#define STMT_VINFO_MEMTAG(S) (S)->memtag +#define STMT_VINFO_TYPE(S) (S)->type +#define STMT_VINFO_STMT(S) (S)->stmt +#define STMT_VINFO_LOOP(S) (S)->loop +#define STMT_VINFO_RELEVANT_P(S) (S)->relevant +#define STMT_VINFO_VECTYPE(S) (S)->vectype +#define STMT_VINFO_VEC_STMT(S) (S)->vectorized_stmt +#define STMT_VINFO_DATA_REF(S) (S)->data_ref_info +#define STMT_VINFO_MEMTAG(S) (S)->memtag +#define STMT_VINFO_VECT_DR_BASE(S) (S)->vect_dr_base static inline void set_stmt_info (stmt_ann_t ann, stmt_vec_info stmt_info); static inline stmt_vec_info vinfo_for_stmt (tree stmt); @@ -123,6 +133,9 @@ unknown_alignment_for_access_p (struct data_reference *data_ref_info) return (DR_MISALIGNMENT (data_ref_info) == -1); } +/* Perform signed modulo, always returning a non-negative value. */ +#define VECT_SMODULO(x,y) ((x) % (y) < 0 ? ((x) % (y) + (y)) : (x) % (y)) + /*-----------------------------------------------------------------*/ /* Info on vectorized loops. */ |