[nvptx] Add support for a per-worker broadcast buffer and barrier

Programming / Compilers / GCC - vries [138bc75d-0d04-0410-961f-82ee72b054a4] - 7 January 2019 08:10 EST

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

- 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.

ecfa63b9bcb [nvptx] Add support for a per-worker broadcast buffer and barrier
gcc/ChangeLog | 18 ++++++
gcc/config/nvptx/nvptx.c | 153 +++++++++++++++++++++++++++++++++++++++++------
gcc/config/nvptx/nvptx.h | 4 ++
3 files changed, 156 insertions(+), 19 deletions(-)

Upstream: gcc.gnu.org


  • Share