This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: update acc routines in fortran
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Cesar Philippidis <cesar at codesourcery dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Fortran List <fortran at gcc dot gnu dot org>, Tobias Burnus <burnus at net-b dot de>
- Date: Fri, 20 Nov 2015 11:18:11 +0100
- Subject: Re: update acc routines in fortran
- Authentication-results: sourceware.org; auth=none
- References: <564DF845 dot 3030308 at codesourcery dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Nov 19, 2015 at 08:26:45AM -0800, Cesar Philippidis wrote:
> (gfc_oacc_routine_name): New struct;
Full stop instead of semicolon.
> diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
> index 1f6311c..e321072 100644
> --- a/gcc/tree-nested.c
> +++ b/gcc/tree-nested.c
> @@ -1106,6 +1106,9 @@ convert_nonlocal_omp_clauses (tree *pclauses, struct walk_stmt_info *wi)
> case OMP_CLAUSE_NUM_TASKS:
> case OMP_CLAUSE_HINT:
> case OMP_CLAUSE__CILK_FOR_COUNT_:
> + case OMP_CLAUSE_NUM_GANGS:
> + case OMP_CLAUSE_NUM_WORKERS:
> + case OMP_CLAUSE_VECTOR_LENGTH:
> wi->val_only = true;
> wi->is_lhs = false;
> convert_nonlocal_reference_op (&OMP_CLAUSE_OPERAND (clause, 0),
> @@ -1173,6 +1176,10 @@ convert_nonlocal_omp_clauses (tree *pclauses, struct walk_stmt_info *wi)
> case OMP_CLAUSE_THREADS:
> case OMP_CLAUSE_SIMD:
> case OMP_CLAUSE_DEFAULTMAP:
> + case OMP_CLAUSE_GANG:
> + case OMP_CLAUSE_WORKER:
> + case OMP_CLAUSE_VECTOR:
This looks wrong. OMP_CLAUSE_GANG has 2 arguments, OMP_CLAUSE_WORKER and
OMP_CLAUSE_VECTOR one argument, if you use a non-local decl or local decl
that is referenced by a nested routine in those operands, it won't be
handled properly.
> @@ -1830,6 +1840,10 @@ convert_local_omp_clauses (tree *pclauses, struct walk_stmt_info *wi)
> case OMP_CLAUSE_THREADS:
> case OMP_CLAUSE_SIMD:
> case OMP_CLAUSE_DEFAULTMAP:
> + case OMP_CLAUSE_GANG:
> + case OMP_CLAUSE_WORKER:
> + case OMP_CLAUSE_VECTOR:
> + case OMP_CLAUSE_SEQ:
Ditto.
Otherwise LGTM.
Jakub