+2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
+
+ PR c/87924
+ * c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
+ clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
+
2019-02-15 Jakub Jelinek <jakub@redhat.com>
PR c/89340
}
/* OpenACC:
- wait ( int-expr-list ) */
+ wait [( int-expr-list )] */
static tree
c_parser_oacc_clause_wait (c_parser *parser, tree list)
if (c_parser_peek_token (parser)->type == CPP_OPEN_PAREN)
list = c_parser_oacc_wait_list (parser, clause_loc, list);
+ else
+ {
+ tree c = build_omp_clause (clause_loc, OMP_CLAUSE_WAIT);
+
+ OMP_CLAUSE_DECL (c) = build_int_cst (integer_type_node, GOMP_ASYNC_NOVAL);
+ OMP_CLAUSE_CHAIN (c) = list;
+ list = c;
+ }
return list;
}
+2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
+
+ PR c/87924
+ * parser.c (cp_parser_oacc_clause_wait): Add representation of wait
+ clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
+
2019-02-19 Jakub Jelinek <jakub@redhat.com>
PR c++/89387
}
/* OpenACC:
- wait ( int-expr-list ) */
+ wait [( int-expr-list )] */
static tree
cp_parser_oacc_clause_wait (cp_parser *parser, tree list)
{
location_t location = cp_lexer_peek_token (parser->lexer)->location;
- if (cp_lexer_peek_token (parser->lexer)->type != CPP_OPEN_PAREN)
- return list;
+ if (cp_lexer_peek_token (parser->lexer)->type == CPP_OPEN_PAREN)
+ list = cp_parser_oacc_wait_list (parser, location, list);
+ else
+ {
+ tree c = build_omp_clause (location, OMP_CLAUSE_WAIT);
- list = cp_parser_oacc_wait_list (parser, location, list);
+ OMP_CLAUSE_DECL (c) = build_int_cst (integer_type_node, GOMP_ASYNC_NOVAL);
+ OMP_CLAUSE_CHAIN (c) = list;
+ list = c;
+ }
return list;
}
+2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
+
+ PR c/87924
+ * openmp.c (gfc_match_omp_clauses): Add representation of wait clause
+ without argument as 'wait (GOMP_ASYNC_NOVAL)'.
+
2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87689
break;
}
else if (m == MATCH_NO)
- needs_space = true;
+ {
+ gfc_expr *expr
+ = gfc_get_constant_expr (BT_INTEGER,
+ gfc_default_integer_kind,
+ &gfc_current_locus);
+ mpz_set_si (expr->value.integer, GOMP_ASYNC_NOVAL);
+ gfc_expr_list **expr_list = &c->wait_list;
+ while (*expr_list)
+ expr_list = &(*expr_list)->next;
+ *expr_list = gfc_get_expr_list ();
+ (*expr_list)->expr = expr;
+ needs_space = true;
+ }
continue;
}
if ((mask & OMP_CLAUSE_WORKER)
+2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
+
+ PR c/87924
+ * oacc-parallel.c (GOACC_parallel_keyed): Remove condition on call to
+ goacc_wait().
+ (goacc_wait): Handle ACC_ASYNC_NOVAL case, remove goacc_thread() call
+ and related adjustment.
+
2019-01-30 Jakub Jelinek <jakub@redhat.com>
PR c++/88988
case GOMP_LAUNCH_WAIT:
{
unsigned num_waits = GOMP_LAUNCH_OP (tag);
-
- if (num_waits)
- goacc_wait (async, num_waits, &ap);
+ goacc_wait (async, num_waits, &ap);
break;
}
static void
goacc_wait (int async, int num_waits, va_list *ap)
{
- struct goacc_thread *thr = goacc_thread ();
- struct gomp_device_descr *acc_dev = thr->dev;
-
while (num_waits--)
{
int qid = va_arg (*ap, int);
-
+
+ /* Waiting on ACC_ASYNC_NOVAL maps to 'wait all'. */
+ if (qid == acc_async_noval)
+ {
+ if (async == acc_async_sync)
+ acc_wait_all ();
+ else
+ acc_wait_all_async (async);
+ break;
+ }
+
if (acc_async_test (qid))
continue;
launching on, the queue itself will order work as
required, so there's no need to wait explicitly. */
else
- acc_dev->openacc.async_wait_async_func (qid, async);
+ acc_wait_async (qid, async);
}
}