This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4 simd, RFC] Simple fix to override vectorization cost estimation.
- From: Richard Biener <rguenther at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>, Yuri Rumyantsev <ysrumyan at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Igor Zamyatin <izamyatin at gmail dot com>, Areg Melik-Adamyan <areg dot melikadamyan at gmail dot com>
- Date: Thu, 31 Oct 2013 19:36:15 +0100
- Subject: Re: [gomp4 simd, RFC] Simple fix to override vectorization cost estimation.
- Authentication-results: sourceware.org; auth=none
- References: <CAEoMCqRPF8h_h0FU=+YHiizio-axzwx77q5gw-ewgbLRhv=cjQ at mail dot gmail dot com> <20131031151528 dot GS27813 at tucnak dot zalov dot cz>
Jakub Jelinek <jakub@redhat.com> wrote:
>On Thu, Oct 31, 2013 at 07:02:28PM +0400, Yuri Rumyantsev wrote:
>> Here is a simple fix which allows to vectorize loop marked with
>> 'pragma omp simd' even if cost model tells us that vectorization is
>> not profitable.
>> I checked that on simple test-case is works as expected.
>>
>> Is it Ok for trunk?
>>
>> ChangeLog:
>>
>> 2013-10-31 Yuri Rumyantsev <ysrumyan@gmail.com>
>>
>> * tree-vect-loop.c (vect_estimate_min_profitable_iters): Override
>> cost estimation for loops marked as vectorizable.
>
>That looks too simplistics, IMHO it is undesirable to disregard the
>profitability checks together. For #pragma omp simd or #pragma simd
>loops, I can understand that we should admit our cost model is not very
>high
>quality and so in border cases consider vectorizing rather than not
>vectorizing, say for force_vect by increasing the scalar cost by some
>factor or decreasing vector cost by some factor, but disregarding it
>altogether doesn't look wise. The question is what factor should we
>use?
>150% of scalar cost, something else?
Please improve the cost-model instead.
Thanks,
Richard.
> Jakub