This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: update acc routines in fortran


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]