update acc routines in fortran
Cesar Philippidis
cesar@codesourcery.com
Wed Nov 25 04:42:00 GMT 2015
On 11/20/2015 02:18 AM, Jakub Jelinek wrote:
> On Thu, Nov 19, 2015 at 08:26:45AM -0800, Cesar Philippidis wrote:
>> (gfc_oacc_routine_name): New struct;
>
> Full stop instead of semicolon.
Fixed.
>> 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.
Yeah, you're right. This didn't get updated when we added support for
the loop shape arguments. I fixed that in this patch.
>> @@ -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.
Are the tree-nested changes ok?
Cesar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gfc_routines-20151123.diff
Type: text/x-patch
Size: 28365 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20151125/5f549a56/attachment.bin>
More information about the Gcc-patches
mailing list