This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] OpenMP #pragma omp declare simd support (take 2)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Richard Biener <rguenther at suse dot de>, Richard Henderson <rth at redhat dot com>, Martin Jambor <mjambor at suse dot cz>, Aldy Hernandez <aldyh at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 25 Nov 2013 18:25:34 +0100
- Subject: Re: [PATCH] OpenMP #pragma omp declare simd support (take 2)
- Authentication-results: sourceware.org; auth=none
- References: <20131122003437 dot GS892 at tucnak dot redhat dot com> <alpine dot LNX dot 2 dot 00 dot 1311221003080 dot 8615 at zhemvz dot fhfr dot qr> <20131125164011 dot GZ892 at tucnak dot redhat dot com> <20131125171550 dot GA17059 at kam dot mff dot cuni dot cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Nov 25, 2013 at 06:15:50PM +0100, Jan Hubicka wrote:
> > > What's the reason you cannot defer SIMD cloning to LTRANS stage
> > > as simple IPA pass next to IPA-PTA?
> >
> > Ok, deferring till after IPA-PTA was easy, just small ipa-cp.c changes
> > (look at the attribute rather than simd*clone* fields), passes.def and
> > had to tweak ipa_add_new_function which assumed that all new functions
> > must be definitions with gimple body.
>
> Note that any small IPA pass at ltrans will increase peak memory use of
> ltrans copmilation by loading all function bodies into memory (since
> IPA transformations needs to be applied first).
>
> It would be nice to avoid these enabled by default unless we have really
> good reason for it.
bool gate () { return flag_openmp || flag_openmp_simd
|| flag_enable_cilkplus; }
isn't exactly enabled by default ;)
Anyway, all the pass needs is bodies of functions with "omp declare simd"
attribute which will be defined in the current partition, for functions
defined in other partitions all it wants to do is just clone the
DECL_EXTERNAL FUNCTION_DECL. But it needs to be called before any
caller's of that function (whether extern/in another partition, or local
(defined in the current partition) will run through vectorization.
Jakub