From: Tom de Vries Date: Mon, 17 Dec 2018 21:27:09 +0000 (+0000) Subject: [nvptx] Add PTX_WARP_SIZE X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d17a4763a71cbf10d3d4bb93bed11f832a24683;p=gcc.git [nvptx] Add PTX_WARP_SIZE Add PTX_WARP_SIZE constant and use it in nvptx_simt_vf. The function nvptx_simt_vf is used for OpenMP, and using PTX_WARP_SIZE here decouples the OpenMP support from the PTX_VECTOR_LENGTH constant used in OpenACC support. Build and reg-tested on x86_64 with nvptx accelerator. 2018-12-17 Tom de Vries * config/nvptx/nvptx.c (PTX_WARP_SIZE): Define. (nvptx_simt_vf): Return PTX_WARP_SIZE instead of PTX_VECTOR_LENGTH. From-SVN: r267215 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7b3144ecc0a..b53cd6262e6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-12-17 Tom de Vries + + * config/nvptx/nvptx.c (PTX_WARP_SIZE): Define. + (nvptx_simt_vf): Return PTX_WARP_SIZE instead of PTX_VECTOR_LENGTH. + 2018-12-17 Tom de Vries * config/nvptx/nvptx.c (nvptx_single): Fix whitespace. diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 01505899785..9906716890e 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -81,6 +81,8 @@ #define WORKAROUND_PTXJIT_BUG_2 1 #define WORKAROUND_PTXJIT_BUG_3 1 +#define PTX_WARP_SIZE 32 + /* The various PTX memory areas an object might reside in. */ enum nvptx_data_area { @@ -5175,7 +5177,7 @@ nvptx_expand_builtin (tree exp, rtx target, rtx ARG_UNUSED (subtarget), static int nvptx_simt_vf () { - return PTX_VECTOR_LENGTH; + return PTX_WARP_SIZE; } /* Validate compute dimensions of an OpenACC offload or routine, fill