aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2019-01-12 10:27:34 +0000
committerTom de Vries <vries@gcc.gnu.org>2019-01-12 10:27:34 +0000
commitaf79605ec27c0db7dee9ee001cd7d768eb6fcf02 (patch)
tree2a27c57227ee654b750724c6229e1cdfb72ca771 /gcc
parentd6f528e70ad88ddcc9786e6050d92e003d19d0a3 (diff)
downloadgcc-af79605ec27c0db7dee9ee001cd7d768eb6fcf02.zip
gcc-af79605ec27c0db7dee9ee001cd7d768eb6fcf02.tar.gz
gcc-af79605ec27c0db7dee9ee001cd7d768eb6fcf02.tar.bz2
[nvptx] Apply vector-partitionable routines workaround to default vl
Make "[nvptx] Force vl32 if calling vector-partitionable routines" work as well if vector length is set by modifying PTX_DEFAULT_VECTOR_LENGTH. 2019-01-12 Tom de Vries <tdevries@suse.de> * config/nvptx/nvptx.c (nvptx_goacc_validate_dims_1): In offloading region calling vector-partitionable routine, set default_vector_length to WARP_SIZE. From-SVN: r267879
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/nvptx/nvptx.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 87697c4..24174c1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2019-01-12 Tom de Vries <tdevries@suse.de>
+ * config/nvptx/nvptx.c (nvptx_goacc_validate_dims_1): In offloading
+ region calling vector-partitionable routine, set default_vector_length
+ to WARP_SIZE.
+
+2019-01-12 Tom de Vries <tdevries@suse.de>
+
* config/nvptx/nvptx.c (nvptx_goacc_validate_dims_1): Add an use new
variable default_vector_length.
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index 95d72d0..1d97045 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -5669,6 +5669,8 @@ nvptx_goacc_validate_dims_1 (tree decl, int dims[], int fn_level, unsigned used)
const char *vector_reason = NULL;
if (offload_region_p && has_vector_partitionable_routine_calls_p (decl))
{
+ default_vector_length = PTX_WARP_SIZE;
+
if (dims[GOMP_DIM_VECTOR] > PTX_WARP_SIZE)
{
vector_reason = G_("using vector_length (%d) due to call to"