openacc reference reductions
Cesar Philippidis
cesar@codesourcery.com
Mon Feb 22 15:34:00 GMT 2016
Ping. This patch still needs a review.
Cesar
On 02/09/2016 08:17 AM, Cesar Philippidis wrote:
> On 02/09/2016 07:33 AM, Nathan Sidwell wrote:
>> While I've not looked at the rest of the patch, this bit stood out:
>>
>>> +static bool
>>> +is_oacc_parallel_reduction (tree var, omp_context *ctx)
>>> +{
>>> + if (!is_oacc_parallel (ctx))
>>> + return false;
>>> +
>>> + tree clauses = gimple_omp_target_clauses (ctx->stmt);
>>> +
>>> + /* Don't install a local copy of the decl if it used
>>> + inside a acc parallel reduction. */
>>
>> ^^ comment is misleading -- this routine's not installing anything
>>
>>> + if (is_oacc_parallel (ctx))
>>
>> ^^ already checked above.
>>
>>> + for (tree c = clauses; c; c = OMP_CLAUSE_CHAIN (c))
>>> + if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_REDUCTION
>>> + && OMP_CLAUSE_DECL (c) == var)
>>> + return true;
>>> +
>>> + return false;
>>> +}
>>> +
>
> Thanks for catching that. Those are artifacts from when this code used
> to be located exclusively in scan_sharing_clauses. I've updated the
> patch with those changes.
>
> Cesar
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trunk-reductions-20160209.diff
Type: text/x-patch
Size: 132984 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160222/d89bac28/attachment.bin>
More information about the Gcc-patches
mailing list