This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64] Change aarch64 vector cost to match vectorizer
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Pawel Kupidura <Pawel dot Kupidura at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 4 Aug 2015 11:48:53 +0100
- Subject: Re: [PATCH][AArch64] Change aarch64 vector cost to match vectorizer
- Authentication-results: sourceware.org; auth=none
- References: <55B630A1 dot 2030802 at arm dot com> <20150803162612 dot GA32098 at arm dot com> <55C08E93 dot 2030405 at arm dot com>
On Tue, Aug 04, 2015 at 11:06:11AM +0100, Pawel Kupidura wrote:
> Hi,
>
> I'm sorry about the issues with formatting, it should be fixed now.
> Here's corrected version with diff to current trunk.
Hi Pawel,
I'm still having trouble getting this patch to apply, I'm not sure whether
it is the format=flowed in your mail headers, or the quoted-printable
encoding, or something else. Certainly when I open your emails I see :
if (where == vect_body && stmt_info && stmt_in_inner_loop_p
(stmt_info))
The content of the patch is OK to commit, but it would be good to
have a copy on list that can be easily applied.
Thanks,
James
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index fdc4a7e..d1c6663 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,7 @@
> +2015-08-04 Pawel Kupidura <pawel.kupidura@arm.com>
> + * config/aarch64/aarch64.c: Change inner loop statement cost
> + to be consistent with other targets.
> +
> 2015-08-03 Abe Skolnik <a.skolnik@samsung.com>
>
> * tree-if-conv.c: Fix various typos in comments.
> diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
> index 2b1ae36..173a385 100644
> --- a/gcc/config/aarch64/aarch64.c
> +++ b/gcc/config/aarch64/aarch64.c
> @@ -7086,15 +7086,9 @@ aarch64_add_stmt_cost (void *data, int count,
> enum vect_cost_for_stmt kind,
>
> /* Statements in an inner loop relative to the loop being
> vectorized are weighted more heavily. The value here is
> - a function (linear for now) of the loop nest level. */
> + arbitrary and could potentially be improved with analysis. */
> if (where == vect_body && stmt_info && stmt_in_inner_loop_p
> (stmt_info))
> - {
> - loop_vec_info loop_info = STMT_VINFO_LOOP_VINFO (stmt_info);
> - struct loop *loop = LOOP_VINFO_LOOP (loop_info);
> - unsigned nest_level = loop_depth (loop);
> -
> - count *= nest_level;
> - }
> + count *= 50; /* FIXME */
>
> retval = (unsigned) (count * stmt_cost);
> cost[where] += retval;