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: "Iyer, Balaji V" <balaji dot v dot iyer at intel dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, Aldy Hernandez <aldyh at redhat dot com>, "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 17 Dec 2013 14:32:01 +0000
- Subject: RE: [PING]: [GOMP4] [PATCH] SIMD-Enabled Functions (formerly Elemental functions) for C
- Authentication-results: sourceware.org; auth=none
- References: <52A9D58D dot 2040004 at redhat dot com> <BF230D13CA30DD48930C31D4099330003A4B170C at FMSMSX101 dot amr dot corp dot intel dot com> <52AA1C79 dot 6060306 at redhat dot com> <BF230D13CA30DD48930C31D4099330003A4B1ADC at FMSMSX101 dot amr dot corp dot intel dot com> <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> <BF230D13CA30DD48930C31D4099330003A4B2681 at FMSMSX101 dot amr dot corp dot intel dot com> <20131217061731 dot GZ892 at tucnak dot redhat dot com>
> -----Original Message-----
> From: Jakub Jelinek [mailto:jakub@redhat.com]
> Sent: Tuesday, December 17, 2013 1:18 AM
> To: Iyer, Balaji V
> Cc: Joseph S. Myers; Aldy Hernandez; 'gcc-patches@gcc.gnu.org'
> Subject: Re: [PING]: [GOMP4] [PATCH] SIMD-Enabled Functions (formerly
> Elemental functions) for C
>
> On Tue, Dec 17, 2013 at 03:51:14AM +0000, Iyer, Balaji V wrote:
> > Hi Jakub,
> > I will work on this, but I need a couple clarifications about some of
> your comments. Please see below:
> >
> > > > +#define CILK_SIMD_FN_CLAUSE_MASK \
> > > > + ( (OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_SIMDLEN)
> > > \
> > > > + | (OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_LINEAR)
> > > \
> > > > + | (OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_UNIFORM)
> > > \
> > > > + | (OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_INBRANCH)
> > > \
> > > > + | (OMP_CLAUSE_MASK_1 <<
> > > PRAGMA_OMP_CLAUSE_NOTINBRANCH))
> > >
> > > I thought you'd instead add there
> PRAGMA_CILK_CLAUSE_VECTORLENGTH,
> > > PRAGMA_CILK_CLAUSE_MASK and PRAGMA_CILK_CLAUSE_NOMASK
> (or similar).
> > >
> >
> > I looked at OpenACC implementation and they seem to use the
> OMP_CLAUSE_* (line # 11174 in c-parser.c)
>
> It uses just PRAGMA_OMP_CLAUSE_NONE, which really means no clauses at
> all (I
> think it is for now).
>
> > Also, If I created CILK_CLAUSE_* variants, I have to re-create another
> function similar to c_parser_omp_all_clauses, whose workings will be
> identical to the c_parser_omp_all_clauses. Is that OK with you?
>
> No, I'd remove enum pragma_cilk_clause altogether and fold it into the end
> of
> pragma_omp_clause, as:
> PRAGMA_CILK_CLAUSE_VECTORLENGTH,
> PRAGMA_CILK_CLAUSE_MASK,
> PRAGMA_CILK_CLAUSE_NOMASK,
> PRAGMA_CILK_CLAUSE_NONE = PRAGMA_OMP_CLAUSE_NONE,
> PRAGMA_CILK_CLAUSE_LINEAR = PRAGMA_OMP_CLAUSE_LINEAR,
> PRAGMA_CILK_CLAUSE_PRIVATE = PRAGMA_OMP_CLAUSE_PRIVATE,
> PRAGMA_CILK_CLAUSE_FIRSTPRIVATE =
> PRAGMA_OMP_CLAUSE_FIRSTPRIVATE,
> PRAGMA_CILK_CLAUSE_LASTPRIVATE =
> PRAGMA_OMP_CLAUSE_LASTPRIVATE,
> PRAGMA_CILK_CLAUSE_REDUCTION =
> PRAGMA_OMP_CLAUSE_REDUCTION
> so that you can use it in the same bitmasks.
>
> That way, you don't have to change anything in c_parser_omp_all_clauses,
> just add handling of the 3 clauses that don't have OpenMP counterparts.
I think it sort of makes sense to me now. I will work on this.
Oh, VECTORLENGTH in SIMD-enabled function is same as SIMDLEN in OMP4
And,
MASK = INBRANCH
NOMASK = NOTINBRANCH.
Thanks,
Balaji V. Iyer.
>
> Jakub