Patchwork PING: Fwd: Re: [patch] implement Cilk Plus simd loops on trunk

login
register
mail settings
Submitter Thomas Schwinge
Date March 7, 2014, 8:21 p.m.
Message ID <87bnxhlpyb.fsf@kepler.schwinge.homeip.net>
Download mbox | patch
Permalink /patch/328068/
State New
Headers show

Comments

Thomas Schwinge - March 7, 2014, 8:21 p.m.
Hi!

On Fri, 15 Nov 2013 14:44:45 -0700, Aldy Hernandez <aldyh@redhat.com> wrote:
> I fixed a few nits Jason pointed out off-line, and both him and Jakub 
> have approved the patch for trunk.
> 
> In running the final round of tests I noticed a few problems with my 
> choice of bit numbers for the GF_OMP_* masks.  I fixed them, and re-ran 
> tests on x86-64 Linux.
> 
> Attached is the final version of the patch I have committed to trunk.

> Date:   Mon Oct 14 18:32:13 2013 -0500

> --- a/gcc/omp-low.c
> +++ b/gcc/omp-low.c

> @@ -3587,7 +3619,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
>        /* Don't add any barrier for #pragma omp simd or
>  	 #pragma omp distribute.  */
>        if (gimple_code (ctx->stmt) != GIMPLE_OMP_FOR
> -	  || gimple_omp_for_kind (ctx->stmt) == GF_OMP_FOR_KIND_FOR)
> +	  || gimple_omp_for_kind (ctx->stmt) & GF_OMP_FOR_KIND_FOR)
>  	gimple_seq_add_stmt (ilist, build_omp_barrier (NULL_TREE));
>      }

Maybe it's just too late on a Friday evening, but I don't understand this
change, part of r204863.  GF_OMP_FOR_KIND_FOR has the value zero;
shouldn't this comparison have remained unchanged?  Is the following
(untested) patch OK for trunk?  Does this need a test case?

commit f3c7834ecbedc50e04223d24b1b671fc8a62c169
Author: Thomas Schwinge <thomas@codesourcery.com>
Date:   Fri Mar 7 21:11:43 2014 +0100

    Restore check for OpenMP for construct.
    
    	gcc/
    	* omp-low.c (lower_rec_input_clauses) <build_omp_barrier>: Restore
    	check for GF_OMP_FOR_KIND_FOR.



Grüße,
 Thomas
Thomas Schwinge - March 14, 2014, 10:29 a.m.
Hi!

Ping.

On Fri, 07 Mar 2014 21:21:48 +0100, I wrote:
> On Fri, 15 Nov 2013 14:44:45 -0700, Aldy Hernandez <aldyh@redhat.com> wrote:
> > I fixed a few nits Jason pointed out off-line, and both him and Jakub 
> > have approved the patch for trunk.
> > 
> > In running the final round of tests I noticed a few problems with my 
> > choice of bit numbers for the GF_OMP_* masks.  I fixed them, and re-ran 
> > tests on x86-64 Linux.
> > 
> > Attached is the final version of the patch I have committed to trunk.
> 
> > Date:   Mon Oct 14 18:32:13 2013 -0500
> 
> > --- a/gcc/omp-low.c
> > +++ b/gcc/omp-low.c
> 
> > @@ -3587,7 +3619,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
> >        /* Don't add any barrier for #pragma omp simd or
> >  	 #pragma omp distribute.  */
> >        if (gimple_code (ctx->stmt) != GIMPLE_OMP_FOR
> > -	  || gimple_omp_for_kind (ctx->stmt) == GF_OMP_FOR_KIND_FOR)
> > +	  || gimple_omp_for_kind (ctx->stmt) & GF_OMP_FOR_KIND_FOR)
> >  	gimple_seq_add_stmt (ilist, build_omp_barrier (NULL_TREE));
> >      }
> 
> Maybe it's just too late on a Friday evening, but I don't understand this
> change, part of r204863.  GF_OMP_FOR_KIND_FOR has the value zero;
> shouldn't this comparison have remained unchanged?  Is the following
> (untested) patch OK for trunk?  Does this need a test case?
> 
> commit f3c7834ecbedc50e04223d24b1b671fc8a62c169
> Author: Thomas Schwinge <thomas@codesourcery.com>
> Date:   Fri Mar 7 21:11:43 2014 +0100
> 
>     Restore check for OpenMP for construct.
>     
>     	gcc/
>     	* omp-low.c (lower_rec_input_clauses) <build_omp_barrier>: Restore
>     	check for GF_OMP_FOR_KIND_FOR.
> 
> diff --git gcc/omp-low.c gcc/omp-low.c
> index 4dc3956..713a4ae 100644
> --- gcc/omp-low.c
> +++ gcc/omp-low.c
> @@ -3915,7 +3915,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
>        /* Don't add any barrier for #pragma omp simd or
>  	 #pragma omp distribute.  */
>        if (gimple_code (ctx->stmt) != GIMPLE_OMP_FOR
> -	  || gimple_omp_for_kind (ctx->stmt) & GF_OMP_FOR_KIND_FOR)
> +	  || gimple_omp_for_kind (ctx->stmt) == GF_OMP_FOR_KIND_FOR)
>  	gimple_seq_add_stmt (ilist, build_omp_barrier (NULL_TREE));
>      }
>  


Grüße,
 Thomas
Jakub Jelinek - March 17, 2014, 4:54 p.m.
On Fri, Mar 07, 2014 at 09:21:48PM +0100, Thomas Schwinge wrote:
> Maybe it's just too late on a Friday evening, but I don't understand this
> change, part of r204863.  GF_OMP_FOR_KIND_FOR has the value zero;
> shouldn't this comparison have remained unchanged?  Is the following
> (untested) patch OK for trunk?  Does this need a test case?
> 
> commit f3c7834ecbedc50e04223d24b1b671fc8a62c169
> Author: Thomas Schwinge <thomas@codesourcery.com>
> Date:   Fri Mar 7 21:11:43 2014 +0100
> 
>     Restore check for OpenMP for construct.
>     
>     	gcc/
>     	* omp-low.c (lower_rec_input_clauses) <build_omp_barrier>: Restore
>     	check for GF_OMP_FOR_KIND_FOR.

Ok for trunk, sorry for the delay.

> diff --git gcc/omp-low.c gcc/omp-low.c
> index 4dc3956..713a4ae 100644
> --- gcc/omp-low.c
> +++ gcc/omp-low.c
> @@ -3915,7 +3915,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
>        /* Don't add any barrier for #pragma omp simd or
>  	 #pragma omp distribute.  */
>        if (gimple_code (ctx->stmt) != GIMPLE_OMP_FOR
> -	  || gimple_omp_for_kind (ctx->stmt) & GF_OMP_FOR_KIND_FOR)
> +	  || gimple_omp_for_kind (ctx->stmt) == GF_OMP_FOR_KIND_FOR)
>  	gimple_seq_add_stmt (ilist, build_omp_barrier (NULL_TREE));
>      }
>  

	Jakub

Patch

diff --git gcc/omp-low.c gcc/omp-low.c
index 4dc3956..713a4ae 100644
--- gcc/omp-low.c
+++ gcc/omp-low.c
@@ -3915,7 +3915,7 @@  lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
       /* Don't add any barrier for #pragma omp simd or
 	 #pragma omp distribute.  */
       if (gimple_code (ctx->stmt) != GIMPLE_OMP_FOR
-	  || gimple_omp_for_kind (ctx->stmt) & GF_OMP_FOR_KIND_FOR)
+	  || gimple_omp_for_kind (ctx->stmt) == GF_OMP_FOR_KIND_FOR)
 	gimple_seq_add_stmt (ilist, build_omp_barrier (NULL_TREE));
     }