This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/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:32:28 +0200
- Subject: Re: [PATCH 2/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> <748f6c01-d7f7-b6da-3b13-ee5fdf16437f@linux.vnet.ibm.com>
On Thu, May 4, 2017 at 11:05 AM, Robin Dapp <rdapp@linux.vnet.ibm.com> wrote:
> Wrap some frequently used snippets in separate functions.
+/* Get the costs of peeling NPEEL iterations checking data access costs
+ for all data refs. */
-/* Traverse peeling hash table and calculate cost for each peeling option.
- Find the one with the lowest cost. */
-
-int
-vect_peeling_hash_get_lowest_cost (_vect_peel_info **slot,
- _vect_peel_extended_info *min)
+static void
+vect_get_peeling_costs_all_drs (struct data_reference *dr0,
+ unsigned int *inside_cost,
+ unsigned int *outside_cost,
+ stmt_vector_for_cost *body_cost_vec,
+ unsigned int npeel, unsigned int vf)
{
- vect_peel_info elem = *slot;
- int save_misalignment, dummy;
- unsigned int inside_cost = 0, outside_cost = 0, i;
- gimple *stmt = DR_STMT (elem->dr);
+ gimple *stmt = DR_STMT (dr0);
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
ick. Another case that shows why I like context diffs more ...
Patch looks ok.
Thanks,
Richard.
> gcc/ChangeLog:
>
> 2017-04-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
>
> * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Rename.
> (vect_get_peeling_costs_all_drs): Create function.
> (vect_peeling_hash_get_lowest_cost):
> Use vect_get_peeling_costs_all_drs.
> (vect_peeling_supportable): Create function.