Hi Mat,
first, sorry for the long delay – and for still not properly reviewing,
but I have now started, let's see how far I get.
However, first, I want to point out a compilation issue:
[email protected] wrote:
[…]
--- a/libgomp/barrier.c
+++ b/libgomp/barrier.c
@@ -38,7 +38,7 @@ GOMP_barrier (void)
if (team == NULL)
return;
- gomp_team_barrier_wait (&team->barrier);
+ gomp_team_barrier_wait (&team->barrier, thr->ts.team_id);
}
bool
@@ -50,5 +50,5 @@ GOMP_barrier_cancel (void)
/* The compiler transforms to barrier_cancel when it sees that the
barrier is within a construct that can cancel. Thus we should
never have an orphaned cancellable barrier. */
- return gomp_team_barrier_wait_cancel (&team->barrier);
+ return gomp_team_barrier_wait_cancel (&team->barrier, thr->ts.team_id);
}
This fails for the GCN compilation with:
/home/tob/repos/gcc/libgomp/barrier.c:In function ‘GOMP_barrier’:
/home/tob/repos/gcc/libgomp/barrier.c:41:3:error: too many arguments
to function ‘gomp_team_barrier_wait’; expected 1, have 2
41 | gomp_team_barrier_wait(&team->barrier, thr->ts.team_id);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/tob/repos/gcc/libgomp/libgomp.h:219,
from /home/tob/repos/gcc/libgomp/barrier.c:28:
/home/tob/repos/gcc/libgomp/config/gcn/bar.h:77:13:note: declared here
77 | extern void gomp_team_barrier_wait(gomp_barrier_t *);
| ^~~~~~~~~~~~~~~~~~~~~~
Glancing at it, I don't quite see why the Nvptx compilation succeeds,
but it seems to work.
On the other hand, this issue is fixed by applying 4/5 on top of it.
Still, it would be useful to have a patch that doesn't intermittently
break building the (GCN) compiler.
Tobias,
who now will try to actually look at the patch – which probably will
also answer why Nvptx does not fail.