aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2017-07-03 13:36:45 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2017-07-03 13:36:45 +0000
commit832b4117d4068670cc9ed496a7ab06104a12dc00 (patch)
tree212a6cb0ef5981580051a51ecd93ab60de8b92c8 /gcc/tree-data-ref.h
parente054a1852bf903139a80f34c726453d34338e008 (diff)
downloadgcc-832b4117d4068670cc9ed496a7ab06104a12dc00.zip
gcc-832b4117d4068670cc9ed496a7ab06104a12dc00.tar.gz
gcc-832b4117d4068670cc9ed496a7ab06104a12dc00.tar.bz2
Add DR_STEP_ALIGNMENT
A later patch adds base alignment information to innermost_loop_behavior. After that, the only remaining piece of alignment information that wasn't immediately obvious was the step alignment. Adding that allows a minor simplification to vect_compute_data_ref_alignment, and also potentially improves the handling of variable strides for outer loop vectorisation. A later patch will also use it to give the alignment of the DR as a whole. 2017-07-03 Richard Sandiford <richard.sandiford@linaro.org> gcc/ * tree-data-ref.h (innermost_loop_behavior): Add a step_alignment field. (DR_STEP_ALIGNMENT): New macro. * tree-vectorizer.h (STMT_VINFO_DR_STEP_ALIGNMENT): Likewise. * tree-data-ref.c (dr_analyze_innermost): Initalize step_alignment. (create_data_ref): Print it. * tree-vect-stmts.c (vectorizable_load): Use the step alignment to tell whether the step preserves vector (mis)alignment. * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise. Move the check for an integer step and generalise to all INTEGER_CST. (vect_analyze_data_refs): Set DR_STEP_ALIGNMENT when setting DR_STEP. Print the outer step alignment. From-SVN: r249915
Diffstat (limited to 'gcc/tree-data-ref.h')
-rw-r--r--gcc/tree-data-ref.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-data-ref.h b/gcc/tree-data-ref.h
index 45ecf9b..3a5068d 100644
--- a/gcc/tree-data-ref.h
+++ b/gcc/tree-data-ref.h
@@ -56,6 +56,9 @@ struct innermost_loop_behavior
high value if the offset is zero. This is a byte rather than a bit
quantity. */
unsigned int offset_alignment;
+
+ /* Likewise for STEP. */
+ unsigned int step_alignment;
};
/* Describes the evolutions of indices of the memory reference. The indices
@@ -145,6 +148,7 @@ struct data_reference
#define DR_STEP(DR) (DR)->innermost.step
#define DR_PTR_INFO(DR) (DR)->alias.ptr_info
#define DR_OFFSET_ALIGNMENT(DR) (DR)->innermost.offset_alignment
+#define DR_STEP_ALIGNMENT(DR) (DR)->innermost.step_alignment
#define DR_INNERMOST(DR) (DR)->innermost
typedef struct data_reference *data_reference_p;