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: Jakub Jelinek <jakub at redhat dot com>
- To: Sergey Ostanevich <sergos dot gnu at gmail dot com>
- Cc: Richard Biener <rguenther at suse dot de>, Richard Henderson <rth at redhat dot com>, Yuri Rumyantsev <ysrumyan at gmail dot com>, 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: Fri, 15 Nov 2013 15:19:15 +0100
- Subject: Re: [gomp4 simd, RFC] Simple fix to override vectorization cost estimation.
- Authentication-results: sourceware.org; auth=none
- References: <CAGYS_TKHh83oBtOBYD=oVZzKjikdNb_cVjPHF+Um=g9WZ_DnQQ at mail dot gmail dot com> <20131112141618 dot GS27813 at tucnak dot zalov dot cz> <52823CA1 dot 4020006 at suse dot de> <CAGYS_TKsZfoynGHWzMg9OEAi_ethAzkMgk0CDnCp61S8fqAMSw at mail dot gmail dot com> <alpine dot LNX dot 2 dot 00 dot 1311130947590 dot 4261 at zhemvz dot fhfr dot qr> <CAGYS_T+-PYK2mwWyQa9oiLRLjzvpe47MtMhaO-bM9nF=NFbmkw at mail dot gmail dot com> <alpine dot LNX dot 2 dot 00 dot 1311140939180 dot 4261 at zhemvz dot fhfr dot qr> <CAGYS_TLReW98=J2C9Th7TU-3n=GWnpbZpm9S1HXf0S3iSz7NNA at mail dot gmail dot com> <09964d5c-192d-4f5c-bffb-09fe052c79ab at email dot android dot com> <CAGYS_TKQV3sUWXGSJmX7GjmRcZ603vc-X-f_+OiEPO0DjFUYYw at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Nov 15, 2013 at 06:06:24PM +0400, Sergey Ostanevich wrote:
> here's an example that causes trigger for the cost model. As soon as
> elemental functions will appear and we update the vectorizer so it can accept
> an elemental function inside the loop - we will have the same
> situation as we have
> it now: cost model will bail out with profitability estimation.
Well, right now in the pending elemental patches there is no cost adjustment
in vectorize_simd_clone_call, which is wrong, because that effectively means
a call to the simd clone is considered as zero cost. Perhaps using
the scalar cost of the call (which is considered just as one instruction
anyway), plus perhaps some bigger overhead for argument setup if needed
would be what should we use. But of course we don't know the exact cost of
the scalar version of the function, nor vectorized one, and especially if it
is not in the current TU, we really can't know it.
I wonder if we shouldn't introduce
-fsimd-vect-cost-model=
where user could override the vect cost model for force_vect loops to
something else, be it -fsimd-vect-cost-model=unlimited to get what you are
asking, #pragma omp simd disregarding the cost model always, or
-fsimd-vect-cost-model=dynamic -fvect-cost-model=cheap etc.
Jakub
- References:
- Re: [gomp4 simd, RFC] Simple fix to override vectorization cost estimation.
- Re: [gomp4 simd, RFC] Simple fix to override vectorization cost estimation.
- Re: [gomp4 simd, RFC] Simple fix to override vectorization cost estimation.
- Re: [gomp4 simd, RFC] Simple fix to override vectorization cost estimation.
- Re: [gomp4 simd, RFC] Simple fix to override vectorization cost estimation.
- Re: [gomp4 simd, RFC] Simple fix to override vectorization cost estimation.
- Re: [gomp4 simd, RFC] Simple fix to override vectorization cost estimation.
- Re: [gomp4 simd, RFC] Simple fix to override vectorization cost estimation.
- Re: [gomp4 simd, RFC] Simple fix to override vectorization cost estimation.
- Re: [gomp4 simd, RFC] Simple fix to override vectorization cost estimation.