This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING]: [GOMP4] [PATCH] SIMD-Enabled Functions (formerly Elemental functions) for C
- From: Jakub Jelinek <jakub at zalov dot cz>
- To: "Iyer, Balaji V" <balaji dot v dot iyer at intel dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, "Aldy Hernandez (aldyh at redhat dot com)" <aldyh at zalov dot cz>, "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 18 Dec 2013 07:30:51 +0100
- Subject: Re: [PING]: [GOMP4] [PATCH] SIMD-Enabled Functions (formerly Elemental functions) for C
- Authentication-results: sourceware.org; auth=none
- References: <52AB4673 dot 6060808 at redhat dot com> <BF230D13CA30DD48930C31D4099330003A4B1B3B at FMSMSX101 dot amr dot corp dot intel dot com> <20131216165154 dot GO892 at tucnak dot redhat dot com> <BF230D13CA30DD48930C31D4099330003A4B23A0 at FMSMSX101 dot amr dot corp dot intel dot com> <20131216220045 dot GX892 at tucnak dot redhat dot com> <BF230D13CA30DD48930C31D4099330003A4B2811 at FMSMSX101 dot amr dot corp dot intel dot com> <20131217182527 dot GO892 at tucnak dot redhat dot com> <BF230D13CA30DD48930C31D4099330003A4B28CC at FMSMSX101 dot amr dot corp dot intel dot com> <20131217212616 dot GS892 at tucnak dot redhat dot com> <BF230D13CA30DD48930C31D4099330003A4B2B7F at FMSMSX101 dot amr dot corp dot intel dot com>
- Reply-to: Jakub Jelinek <jakub at zalov dot cz>
On Tue, Dec 17, 2013 at 11:38:48PM +0000, Iyer, Balaji V wrote:
> > What I meant is
> > if (((mask >> PRAGMA_CILK_CLAUSE_VECTORLENGTH) & 1) != 0)
> > is_cilk_simd_fn = true;
> > (note, for 32-bit HWI targets, omp_clause_mask is a class and not all
> > arithmetic is actually supported on it, so better limit yourself to forms used
> > elsewhere already).
> >
>
> I have a better idea.. The where string, if it is "SIMD-enabled functions
> attribute" will indicate that it is a Cilk Plus SIMD-enabled function.
> So, if I do a check for that, then I don't have to do any of this mask
> anding.
>
> This is what I am talking about:
>
> if (where && !strcmp (where, "SIMD-enabled functions attribute"))
> is_cilk_simd_fn = false;
But this is more expensive and the string really is meant for diagnostics
messages, so I'd strongly prefer the above mask check instead.
Ok with that change.
> From what I understood, all the #pragma omp declare simd work are pushed into trunk right?
Yes, though I still want to optimize it a little bit (generate thunks
and/or aliases when desirable/possible), but that only affects exported
entry-points for OpenMP, for Cilk+ the code matches more the Intel ABI
paper and generates only one ISA variant (and expects to parse processor
clause for other ISA variants), rather than emitting all 3.
Jakub