This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/3] Vect peeling cost model
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Robin Dapp <rdapp at linux dot vnet dot ibm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, "Bin.Cheng" <amker dot cheng at gmail dot com>
- Date: Fri, 5 May 2017 12:27:52 +0200
- Subject: Re: [PATCH 1/3] Vect peeling cost model
- Authentication-results: sourceware.org; auth=none
- References: <0296a54f-cb8d-d9b8-380a-9cc553dbb6da@linux.vnet.ibm.com> <CAHFci282BedKpc99pxk1+PLHc7OxkE0bFZHRn1rsE9X+-ihuDQ@mail.gmail.com> <2804E9EF-67D1-4EFD-AF29-65C634EBE24F@gmail.com> <6f1194a0-9e57-0028-faf4-6190beec2009@linux.vnet.ibm.com> <CAFiYyc3e+UmtMGO7nEDeRT0PoTqZ2mGHz1V0C3k2WGsHGgECVg@mail.gmail.com> <362d6e4d-ff81-954a-92b8-486eb9af4b25@linux.vnet.ibm.com>
On Thu, May 4, 2017 at 11:04 AM, Robin Dapp <rdapp@linux.vnet.ibm.com> wrote:
> Some refactoring and definitions to use for (unknown) DR_MISALIGNMENT,
+#define DR_HAS_NEGATIVE_STEP(DR) \
+ tree_int_cst_compare (DR_STEP (DR), size_zero_node) < 0
this will ICE for non-constant DR_STEP so isn't a suitable define.
If you want sth shorter than tree_int_cst_compare (...) < 0 then
tree_int_cst_sgn (DR_STEP (..)) == -1 should work or
compare_tree_int (DR_STEP (...), 0) < 0. But I'd rather leave
this unchanged.
The rest of the patch is ok.
Thanks,
Richard.
> gcc/ChangeLog:
>
> 2017-04-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
>
> * tree-data-ref.h (struct data_reference): Create DR_HAS_NEGATIVE_STEP.
> * tree-vectorizer.h (dr_misalignment): Define DR_MISALIGNMENT.
> * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use.
> (vect_update_misalignment_for_peel): Use.
> (vect_enhance_data_refs_alignment): Use.
> (vect_no_alias_p): Use.
> (vect_duplicate_ssa_name_ptr_info): Use.
> (known_alignment_for_access_p): Use.