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: [gomp4] private reductions


On 01/11/2016 04:10 AM, Thomas Schwinge wrote:

> On Wed, 6 Jan 2016 19:55:02 -0800, Cesar Philippidis <cesar@codesourcery.com> wrote:
>> This patch updates the way that private reductions are handled in gomp4
>> to be more like trunk.
> 
> Anything to commit to trunk (test cases at least?)?

I could possibly apply the support nested acc loops using the same
reduction variable. But I'd like to hold off a little longer until I
have a better solution for reference variables first.

>> This patch has been applied to gomp-4_0-branch.
> 
>> 	PR other/68813
> 
> Can now close that one?

Thanks for reminding me. I closed it.

>> --- a/gcc/omp-low.c
>> +++ b/gcc/omp-low.c
> 
>> @@ -5731,29 +5624,55 @@ lower_oacc_reductions (location_t loc, tree clauses, tree level, bool inner,
> 
>> -	    /* This is enabled on trunk, but has been disabled in the merge of
>> -	       trunk r229767 into gomp-4_0-branch, as otherwise there were a
>> -	       lot of regressions in libgomp reduction execution tests.  It is
>> -	       unclear if the problem is in the tests themselves, or here, or
>> -	       elsewhere.  Given the usage of "var =
>> -	       OMP_CLAUSE_REDUCTION_PRIVATE_DECL (c)" on gomp-4_0-branch, maybe
>> -	       we have to consider that here, too, instead of "orig"?  */
>> -#if 0
>>  	    else
>>  	      incoming = outgoing = orig;
>> -#endif
> 
> Ah, nice -- does your patch completely resolve the issue (that is, remove
> the code divergence between trunk and gomp-4_0-branch), that I once asked
> Nathan to look into,
> <http://news.gmane.org/find-root.php?message_id=%3C878u6bz9p4.fsf%40kepler.schwinge.homeip.net%3E>?

Yes and no. It's better in the sense that firstprivate and private are
now mostly identical with the exception of this change to
build_outer_var_ref
<https://gcc.gnu.org/ml/gcc-patches/2016-01/msg00497.html>. Other than
that, lower_oacc_reductions in gomp4 has changes for nested reductions.

> With you patch applied, I'm seeing some more progressions, so in r232222,
> I committed the following to gomp-4_0-branch:

Thank you for doing that. I'm horrible at keeping xfails up to date.

Cesar


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