Message ID | 87y4bw5nb3.fsf@kepler.schwinge.homeip.net |
---|---|
State | New |
Headers | show |
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
diff --git gcc/testsuite/ChangeLog.gomp gcc/testsuite/ChangeLog.gomp index 2db11df..1634a7c 100644 --- gcc/testsuite/ChangeLog.gomp +++ gcc/testsuite/ChangeLog.gomp @@ -1,5 +1,7 @@ 2016-01-11 Thomas Schwinge <thomas@codesourcery.com> + * gfortran.dg/goacc/reduction-3.f95: Remove XFAIL marker. + * c-c++-common/goacc-gomp/nesting-fail-1.c: Add OpenACC declare directive for "i". diff --git gcc/testsuite/gfortran.dg/goacc/reduction-3.f95 gcc/testsuite/gfortran.dg/goacc/reduction-3.f95 index d7eeb95..c0f6cbf 100644 --- gcc/testsuite/gfortran.dg/goacc/reduction-3.f95 +++ gcc/testsuite/gfortran.dg/goacc/reduction-3.f95 @@ -1,7 +1,3 @@ -! { dg-xfail-if "" { *-*-* } { "*" } { "" } } -! { dg-excess-errors "internal compiler error" } -! { dg-do compile } - program reduction integer, parameter :: n = 40, c = 10 integer :: i, sum diff --git libgomp/ChangeLog.gomp libgomp/ChangeLog.gomp index efdbfd3..cf91c0a 100644 --- libgomp/ChangeLog.gomp +++ libgomp/ChangeLog.gomp @@ -1,3 +1,8 @@ +2016-01-11 Thomas Schwinge <thomas@codesourcery.com> + + * testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c: Remove + XFAIL marker. + 2016-01-07 Cesar Philippidis <cesar@codesourcery.com> * testsuite/libgomp.oacc-c-c++-common/reduction-6.c: New test. diff --git libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c index a186872..672e412 100644 --- libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c @@ -1,6 +1,3 @@ -/* { dg-do run } */ -/* { dg-xfail-run-if "TODO" { *-*-* } } */ - #include <openacc.h> int main ()