Re: [omp4]

2013-11-04 Thread Jakub Jelinek
ent for hacking on this on gomp-4_0-branch, but it would be nice to clean it up before merging to trunk. > Committing to omp4 branch. Thanks. Jakub

Re: [omp4]

2013-11-04 Thread Aldy Hernandez
On 11/04/13 08:44, Jakub Jelinek wrote: On Mon, Nov 04, 2013 at 08:19:12AM -0700, Aldy Hernandez wrote: Hi. While looking over some of your testcases I noticed that array subscripts are not being properly adjusted: foo(int i) { array[i] = } The `i' should use the simd array magic

Re: [omp4]

2013-11-04 Thread Jakub Jelinek
On Mon, Nov 04, 2013 at 08:19:12AM -0700, Aldy Hernandez wrote: > Hi. > > While looking over some of your testcases I noticed that array > subscripts are not being properly adjusted: > > foo(int i) { > array[i] = > } > > The `i' should use the simd array magic instead of ICEing :). >

Re: [omp4] fix array subscripts in simd clones

2013-11-04 Thread Aldy Hernandez
On 11/04/13 08:19, Aldy Hernandez wrote: Hi. While looking over some of your testcases I noticed that array subscripts are not being properly adjusted: foo(int i) { array[i] = } The `i' should use the simd array magic instead of ICEing :). Is the attached patch OK for the branch? A

[omp4]

2013-11-04 Thread Aldy Hernandez
Hi. While looking over some of your testcases I noticed that array subscripts are not being properly adjusted: foo(int i) { array[i] = } The `i' should use the simd array magic instead of ICEing :). Is the attached patch OK for the branch? Aldy gcc/ChangeLog.gomp * omp

Re: OMP4/cilkplus: simd clone function mangling

2013-10-07 Thread Aldy Hernandez
On 09/27/13 09:23, Jakub Jelinek wrote: On Thu, Sep 26, 2013 at 02:31:33PM -0500, Aldy Hernandez wrote: +/* Create a simd clone of OLD_NODE and return it. */ + +static struct cgraph_node * +simd_clone_create (struct cgraph_node *old_node) +{ + struct cgraph_node *new_node; + new_node = cgra

Re: OMP4/cilkplus: simd clone function mangling

2013-09-27 Thread Aldy Hernandez
On 09/27/13 09:23, Jakub Jelinek wrote: On Thu, Sep 26, 2013 at 02:31:33PM -0500, Aldy Hernandez wrote: --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -42806,6 +42806,43 @@ ix86_memmodel_check (unsigned HOST_WIDE_INT val) return val; } +/* Return the default vector mangling

Re: OMP4/cilkplus: simd clone function mangling

2013-09-27 Thread Jakub Jelinek
On Thu, Sep 26, 2013 at 02:31:33PM -0500, Aldy Hernandez wrote: > --- a/gcc/config/i386/i386.c > +++ b/gcc/config/i386/i386.c > @@ -42806,6 +42806,43 @@ ix86_memmodel_check (unsigned HOST_WIDE_INT val) >return val; > } > > +/* Return the default vector mangling ISA code when none is specifie

Re: OMP4/cilkplus: simd clone function mangling

2013-09-27 Thread Aldy Hernandez
On 09/27/13 03:18, Richard Biener wrote: On Thu, Sep 26, 2013 at 9:35 PM, Aldy Hernandez wrote: + /* To distinguish from an OpenMP simd clone, Cilk Plus functions to + be cloned have a distinctive artificial label in addition to "omp + declare simd". */ + bool cilk_clone = flag_enabl

Re: OMP4/cilkplus: simd clone function mangling

2013-09-27 Thread Richard Biener
On Thu, Sep 26, 2013 at 9:35 PM, Aldy Hernandez wrote: >> + /* To distinguish from an OpenMP simd clone, Cilk Plus functions to >> + be cloned have a distinctive artificial label in addition to "omp >> + declare simd". */ >> + bool cilk_clone = flag_enable_cilkplus >> +&& lookup_att

Re: OMP4/cilkplus: simd clone function mangling

2013-09-26 Thread Aldy Hernandez
+ /* To distinguish from an OpenMP simd clone, Cilk Plus functions to + be cloned have a distinctive artificial label in addition to "omp + declare simd". */ + bool cilk_clone = flag_enable_cilkplus +&& lookup_attribute ("cilk plus elemental", +DECL_ATTRIBUTE

OMP4/cilkplus: simd clone function mangling

2013-09-26 Thread Aldy Hernandez
Hi folks. Both OMP4 and Cilk Plus provide mechanisms for simd function cloning. In OMP4 it's "#pragma omp declare simd" and in Cilk Plus they are "elemental functions" (or "simd-enabled functions" in their Intel's latest nomenclature). For lack of a

Re: [omp4/cilkplus] jumps in/out-of #pragma simd for

2013-06-26 Thread Aldy Hernandez
On 06/26/13 10:33, Jakub Jelinek wrote: On Wed, Jun 26, 2013 at 09:44:03AM -0500, Aldy Hernandez wrote: This is a followup for the C++ changes (your pt.c suggested changes, etc). Only a few minor changes are needed, since c_finish_cilk_simd_loop() is shared between C/C++ and it creates the appr

Re: [omp4/cilkplus] jumps in/out-of #pragma simd for

2013-06-26 Thread Jakub Jelinek
On Wed, Jun 26, 2013 at 09:44:03AM -0500, Aldy Hernandez wrote: > This is a followup for the C++ changes (your pt.c suggested changes, etc). > > Only a few minor changes are needed, since c_finish_cilk_simd_loop() > is shared between C/C++ and it creates the appropriate CILK_SIMD > tree node. > >

Re: [omp4/cilkplus] jumps in/out-of #pragma simd for

2013-06-26 Thread Aldy Hernandez
This is a followup for the C++ changes (your pt.c suggested changes, etc). Only a few minor changes are needed, since c_finish_cilk_simd_loop() is shared between C/C++ and it creates the appropriate CILK_SIMD tree node. Is this what you had in mind? commit db2127098137dea6c246041e0d763a57a174f

Re: [omp4/cilkplus] jumps in/out-of #pragma simd for

2013-06-21 Thread Aldy Hernandez
case NE_EXPR: - if (!flag_enable_cilk) + /* NE_EXPR is only allowed for Cilk Plus loops. */ + if (flag_enable_cilk Very weird name of a flag. Should have been flag_cilk or flag_cilkplus IMHO. I know. It was already there from Balaji's first iteration with a

Re: [omp4/cilkplus] jumps in/out-of #pragma simd for

2013-06-21 Thread Richard Henderson
> case NE_EXPR: > - if (!flag_enable_cilk) > + /* NE_EXPR is only allowed for Cilk Plus loops. */ > + if (flag_enable_cilk > + && gimple_omp_for_kind (for_stmt) == GF_OMP_FOR_KIND_CILKSIMD) > + break; > + else > gcc_unreachable (); > -

Re: [omp4/cilkplus] jumps in/out-of #pragma simd for

2013-06-21 Thread Jakub Jelinek
On Fri, Jun 21, 2013 at 07:16:56AM -0500, Aldy Hernandez wrote: > I have done as suggested, and cleaned things up along the way. > > I believe this is the last remaining TODO on my Cilk Plus pragma > simd list. Everything else is dependent on OMP4. > > Is this what you had

[omp4/cilkplus] jumps in/out-of #pragma simd for

2013-06-21 Thread Aldy Hernandez
things up along the way. I believe this is the last remaining TODO on my Cilk Plus pragma simd list. Everything else is dependent on OMP4. Is this what you had in mind? If you'd like, I can submit the OMP changes separately so we can put them on the OMP4 branch. However, my plan is to s

[gomp4/cilkplus] special case NE_EXPR for omp4 loops

2013-06-10 Thread Aldy Hernandez
Hi Jakub. In contrast to OMP4+, Cilk Plus allows a "!=" in the condition to a simd for loop (we are guaranteed no unsigned wrap around). I'm not totally happy with the cleanliness of this patch, but the alternative seems a lot more convoluted. Type checking before hand, s