On Wed, Apr 13, 2016 at 12:42 PM, Robin Dapp <rd...@linux.vnet.ibm.com> wrote:
> Hi,
>
> the attached patch is a start at cleaning up tree-vect-data-refs.c.
> I refactored some stuff I found strange and/or difficult to understand.
> Probably more to come.
>
> The misalignment calculation in vect_compute_data_ref_alignment seems
> quite coarse, is there any work planned for the future?

What do you mean by "coarse"?

> No regressions on s390x and amd64.

+#define DR_MISALIGNMENT_UNKNOWN (-1)
+#define DR_MISALIGNMENT_NONE (0)

Better than NONE would be ALIGNED.  But I wouldn't bother adding a define
for that, it's supposed to be hidden by aligned_access_p already.

Adding DR_MISALIGNMENT_UNKNOWN and replacing -1 by that is ok.

The rest of the changes seem to be just noise to me, they are not better
or worse so I'd rather not do changes like CSEing or renaming vars
just for the sake of it.

Thanks,
Richard.

> Regards
>  Robin
>
> --
>
> gcc/ChangeLog:
>
> 2016-04-13  Robin Dapp  <rd...@linux.vnet.ibm.com>
>
>         * tree-vectorizer.h
>         (dr_misalignment): Introduce named DR_MISALIGNMENT constants.
>         (aligned_access_p): Use constants.
>         (known_alignment_for_access_p): Likewise.
>         * tree-vect-data-refs.c
>         (vect_compute_data_ref_alignment):
>                 Improve output messages and cleanup.
>         (vect_duplicate_ssa_name_ptr_info): Use new constants.
>         (vect_enhance_data_refs_alignment): Likewise.
>         (vect_supportable_dr_alignment): Likewise.
>         (vect_update_misalignment_for_peel): Likewise.
>
> gcc/testsuite/ChangeLog:
>
> 2016-04-13  Robin Dapp  <rd...@linux.vnet.ibm.com>
>
>         * gcc.dg/vect/vect-outer-3a-big-array.c: Use new output message.
>         * gcc.dg/vect/vect-outer-3a.c: Likewise.

Reply via email to