This patch teaches lower_oacc_reductions not to generate calls to
GOACC_{UN}LOCK if they aren't any reductions. That situation can happen
when there is a fake gang reduction on a private variable.

I also found a bug where the lower_rec_input_clauses expects there to be
a data mapping for the reduction variable when there isn't, e.g. for
private/local reduction variables. And I made the nvptx backend aware of
the fact that the lhs of a call to REDUCTION_TEARDOWN may be have been
optimized away for worker reductions too. I have a couple of test cases
for these bugs, but I'll include them with my upcoming auto-independent
loop patch.

This patch has been committed to gomp-4_0-branch.

Cesar

Reply via email to