[nvptx] Only use one logical barrier resource
For openacc loops, we generate this style of code:
...
@%r41 bra.uni $L5;
@%r40 bra $L6;
mov.u64 %r32, %ar0;
cvta.shared.u64 %r39, __worker_bcast;
st.u64 [%r39], %r32;
$L6:
$L5:
bar.sync 0;
@%r40 bra $L4;
cvta.shared.u64 %r38, __worker_bcast;
ld.u64 %r32, [%r38];
...
$L4:
bar.sync 1;
...
The first barrier is there to ensure that no thread reads the broadcast buffer
before it's written. The second barrier is there to ensure that no thread
overwrites the broadcast buffer before all threads have read it (as well as
implementing the obligatory synchronization after a worker loop).
We've been using the logical barrier resources '0' and '1' for these two
barriers, but there's no reason why we can't use the same one.
Use logical barrier resource '0' for both barriers, making the openacc
implementation claim less resources.
Build and reg-tested on x86_64 with nvptx accelerator.
2018-12-19 Tom de Vries <tdevries@suse.de>
* config/nvptx/nvptx.c (nvptx_single): Always pass false to
nvptx_wsync.
(nvptx_process_pars): Likewise.
From-SVN: r267257