Add a helper for getting the overall alignment of a DR
commit5528b2de4ea96414487dec9b1d8bd76f8729325d
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 Jul 2017 13:37:07 +0000 (3 13:37 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 3 Jul 2017 13:37:07 +0000 (3 13:37 +0000)
tree67ac693ded20cc4120dbf6e06c393b0918f0e88a
parenta5456a6d2e5b85ae2ba6e351ddadf41bacbd6a72
Add a helper for getting the overall alignment of a DR

This combines the information from previous patches to give a guaranteed
alignment for the DR as a whole.  This should be a bit safer than using
base_element_aligned, since that only really took the base into account
(not the init or offset).

2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-data-ref.h (dr_alignment): Declare.
* tree-data-ref.c (dr_alignment): New function.
* tree-vectorizer.h (dataref_aux): Remove base_element_aligned.
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
set it.
* tree-vect-stmts.c (vectorizable_store): Use dr_alignment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@249917 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/tree-data-ref.c
gcc/tree-data-ref.h
gcc/tree-vect-data-refs.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.h