re PR fortran/83017 (DO CONCURRENT not parallelizing)
authorRichard Biener <rguenther@suse.de>
Fri, 17 Nov 2017 13:36:37 +0000 (13:36 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 17 Nov 2017 13:36:37 +0000 (13:36 +0000)
2017-11-17  Richard Biener  <rguenther@suse.de>

PR fortran/83017
* tree-core.h (enum annot_expr_kind): Add annot_expr_parallel_kind.
* tree-pretty-print.c (dump_generic_node): Handle
annot_expr_parallel_kind.
* tree-cfg.c (replace_loop_annotate_in_block): Likewise.
* gimplify.c (gimple_boolify): Likewise.

fortran/
* trans-stmt.c (gfc_trans_forall_loop): Annotate DO CONCURRENT
loops with annot_expr_parallel_kind instead of just
annot_expr_ivdep_kind.

From-SVN: r254869

gcc/ChangeLog
gcc/fortran/ChangeLog
gcc/fortran/trans-stmt.c
gcc/gimplify.c
gcc/tree-cfg.c
gcc/tree-core.h
gcc/tree-pretty-print.c

index a08574d7aafb7534a018231a0ec5fdc348516272..993ac9bba249bb62ed04dd1e85437ae5228a092e 100644 (file)
@@ -1,3 +1,12 @@
+2017-11-17  Richard Biener  <rguenther@suse.de>
+
+       PR fortran/83017
+       * tree-core.h (enum annot_expr_kind): Add annot_expr_parallel_kind.
+       * tree-pretty-print.c (dump_generic_node): Handle
+       annot_expr_parallel_kind.
+       * tree-cfg.c (replace_loop_annotate_in_block): Likewise.
+       * gimplify.c (gimple_boolify): Likewise.
+
 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
 
        * config.gcc (extra_headers): Add cet.h for x86 targets.
index d3170c7370a93f961771ba1ba85189a421015205..cd72b1cf0c3fb2ed060d4de40636d51727d436f1 100644 (file)
@@ -1,3 +1,10 @@
+2017-11-17  Richard Biener  <rguenther@suse.de>
+
+       PR fortran/83017
+       * trans-stmt.c (gfc_trans_forall_loop): Annotate DO CONCURRENT
+       loops with annot_expr_parallel_kind instead of just
+       annot_expr_ivdep_kind.
+
 2017-11-15  Martin Liska  <mliska@suse.cz>
 
        * options.c (gfc_post_options):
index ea0f9529f1c7717809fc756685e2b365dccd0e19..a89751bfd79aaecee5073886f44d9b04049af110 100644 (file)
@@ -3455,7 +3455,7 @@ gfc_trans_forall_loop (forall_info *forall_tmp, tree body,
       if (forall_tmp->do_concurrent)
        cond = build2 (ANNOTATE_EXPR, TREE_TYPE (cond), cond,
                       build_int_cst (integer_type_node,
-                                     annot_expr_ivdep_kind));
+                                     annot_expr_parallel_kind));
 
       tmp = build1_v (GOTO_EXPR, exit_label);
       tmp = fold_build3_loc (input_location, COND_EXPR, void_type_node,
index e9168785fc010658f76d0b01f73fe8bb9ddf2a57..d71bd2ab01ecba77e899fd446e8fb4484e8c129b 100644 (file)
@@ -3749,6 +3749,7 @@ gimple_boolify (tree expr)
        case annot_expr_ivdep_kind:
        case annot_expr_no_vector_kind:
        case annot_expr_vector_kind:
+       case annot_expr_parallel_kind:
          TREE_OPERAND (expr, 0) = gimple_boolify (TREE_OPERAND (expr, 0));
          if (TREE_CODE (type) != BOOLEAN_TYPE)
            TREE_TYPE (expr) = boolean_type_node;
index 1772185f033648b37b36d28df5abff21dc4be82c..f44855024a32654821bda7507688a62498de54c3 100644 (file)
@@ -287,6 +287,10 @@ replace_loop_annotate_in_block (basic_block bb, struct loop *loop)
          loop->force_vectorize = true;
          cfun->has_force_vectorize_loops = true;
          break;
+       case annot_expr_parallel_kind:
+         loop->can_be_parallel = true;
+         loop->safelen = INT_MAX;
+         break;
        default:
          gcc_unreachable ();
        }
index f74f1453de6d73d61f31a0be044a225a2eb31c9a..aa54221253c2d760dda5e3b1bbb910b840fdfc2e 100644 (file)
@@ -853,6 +853,7 @@ enum annot_expr_kind {
   annot_expr_ivdep_kind,
   annot_expr_no_vector_kind,
   annot_expr_vector_kind,
+  annot_expr_parallel_kind,
   annot_expr_kind_last
 };
 
index 80d45f96d67c7c776e85c4155cb91d108d62bced..169f9724eb1ae1f59572a1fe99f6a3ac62deea19 100644 (file)
@@ -2638,6 +2638,9 @@ dump_generic_node (pretty_printer *pp, tree node, int spc, dump_flags_t flags,
        case annot_expr_vector_kind:
          pp_string (pp, ", vector");
          break;
+       case annot_expr_parallel_kind:
+         pp_string (pp, ", parallel");
+         break;
        default:
          gcc_unreachable ();
        }