Hi!

On Fri, 29 Aug 2014 14:36:17 +0000, "Zamyatin, Igor" <igor.zamya...@intel.com> 
wrote:
> The patch is another attempt to enable Cilk_for (see eg 
> https://www.cilkplus.org/sites/default/files/open_specifications/Intel_Cilk_plus_lang_spec_1.2.htm)
>  in the GCC compiler.
> 
> Bootstrapped and regtested on x86_64.
> Is it ok for the trunk?

(Committed as r214818.)

One question:

> --- a/gcc/gimplify.c
> +++ b/gcc/gimplify.c
> @@ -7056,6 +7058,7 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p)
>      case OMP_FOR: kind = GF_OMP_FOR_KIND_FOR; break;
>      case OMP_SIMD: kind = GF_OMP_FOR_KIND_SIMD; break;
>      case CILK_SIMD: kind = GF_OMP_FOR_KIND_CILKSIMD; break;
> +    case CILK_FOR: kind = GF_OMP_FOR_KIND_CILKFOR; break;
>      case OMP_DISTRIBUTE: kind = GF_OMP_FOR_KIND_DISTRIBUTE; break;
>      default:
>        gcc_unreachable ();
> @@ -8128,6 +8131,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, 
> gimple_seq *post_p,
>       case OMP_FOR:
>       case OMP_SIMD:
>       case CILK_SIMD:
> +     case CILK_FOR:
>       case OMP_DISTRIBUTE:
>         ret = gimplify_omp_for (expr_p, pre_p);
>         break;

> --- a/gcc/tree.def
> +++ b/gcc/tree.def
> @@ -1064,6 +1064,10 @@ DEFTREECODE (OMP_SIMD, "omp_simd", tcc_statement, 6)
>     Operands like for OMP_FOR.  */
> DEFTREECODE (CILK_SIMD, "cilk_simd", tcc_statement, 6)
> 
> +/* Cilk Plus - _Cilk_for (..)
> +   Operands like for OMP_FOR.  */
> +DEFTREECODE (CILK_FOR, "cilk_for", tcc_statement, 6)
> +
> /* OpenMP - #pragma omp distribute [clause1 ... clauseN]
>     Operands like for OMP_FOR.  */
> DEFTREECODE (OMP_DISTRIBUTE, "omp_distribute", tcc_statement, 6)

Shouldn't CILK_FOR also be added to gcc/gimplify.c:is_gimple_stmt, next
to all the other OMP_FOR variants?

diff --git gcc/gimplify.c gcc/gimplify.c
index 2319fc3..a621824 100644
--- gcc/gimplify.c
+++ gcc/gimplify.c
@@ -4426,6 +4426,7 @@ is_gimple_stmt (tree t)
     case OMP_FOR:
     case OMP_SIMD:
     case CILK_SIMD:
+    case CILK_FOR:
     case OMP_DISTRIBUTE:
     case OACC_LOOP:
     case OMP_SECTIONS:


Grüße,
 Thomas

Attachment: pgpjkD_J5ZtEZ.pgp
Description: PGP signature

Reply via email to