[nvptx] Add support for a per-worker broadcast buffer and barrier
authorTom de Vries <tdevries@suse.de>
Mon, 7 Jan 2019 08:10:47 +0000 (08:10 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Mon, 7 Jan 2019 08:10:47 +0000 (08:10 +0000)
commit0024c32045a72ef45a64ab5673a2ba587978d9d1
tree50fc1b2838eff6a46f1f643067792ab14ff3c259
parentccc0d492f109456db8df72938bf39fd03510d2b3
[nvptx] Add support for a per-worker broadcast buffer and barrier

Add support for a per-worker broadcast buffer and barrier, to be used for
openacc vector_length larger than warp-size.

2019-01-07  Tom de Vries  <tdevries@suse.de>

* config/nvptx/nvptx.c (oacc_bcast_partition): Declare.
(nvptx_option_override): Init oacc_bcast_partition.
(nvptx_init_oacc_workers): New function.
(nvptx_declare_function_name): Call nvptx_init_oacc_workers.
(nvptx_needs_shared_bcast): New function.
(nvptx_find_par): Generalize to enable vectors to use shared-memory
to propagate state.
(nvptx_shared_propagate): Initialize vector bcast partition and
synchronization state.
(nvptx_single):  Generalize to enable vectors to use shared-memory
to propagate state.
(nvptx_process_pars): Likewise.
(nvptx_set_current_function): Initialize oacc_broadcast_partition.
* config/nvptx/nvptx.h (struct machine_function): Add
bcast_partition and sync_bar members.

From-SVN: r267629
gcc/ChangeLog
gcc/config/nvptx/nvptx.c
gcc/config/nvptx/nvptx.h