aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2018-01-12 14:48:00 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-01-12 14:48:00 +0000
commit825010bb37db90c97c9409d3407c8538e3246577 (patch)
tree1041c74928517bf91e4b29ed5dfb33e7f4ac3aed /gcc
parent33b366c3d4e96c37b60d440edff64f915cc1aaaf (diff)
downloadgcc-825010bb37db90c97c9409d3407c8538e3246577.zip
gcc-825010bb37db90c97c9409d3407c8538e3246577.tar.gz
gcc-825010bb37db90c97c9409d3407c8538e3246577.tar.bz2
Allow variable-sized temporary variables in gimplify.c
This is needed to build libgfortran for SVE. The OpenMP code needs to create temporary vector variables, and the variables will therefore be variable-sized for SVE. Earlier patches made such variables work. 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org> gcc/ * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size. (gimple_add_tmp_var): Likewise. From-SVN: r256585
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/gimplify.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 70fff29..823f39d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
+
+ * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
+ poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
+ (gimple_add_tmp_var): Likewise.
+
2018-01-12 Martin Liska <mliska@suse.cz>
* gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 5ad3762..fd0d21e 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -702,7 +702,7 @@ gimple_add_tmp_var_fn (struct function *fn, tree tmp)
/* Later processing assumes that the object size is constant, which might
not be true at this point. Force the use of a constant upper bound in
this case. */
- if (!tree_fits_uhwi_p (DECL_SIZE_UNIT (tmp)))
+ if (!tree_fits_poly_uint64_p (DECL_SIZE_UNIT (tmp)))
force_constant_size (tmp);
DECL_CONTEXT (tmp) = fn->decl;
@@ -721,7 +721,7 @@ gimple_add_tmp_var (tree tmp)
/* Later processing assumes that the object size is constant, which might
not be true at this point. Force the use of a constant upper bound in
this case. */
- if (!tree_fits_uhwi_p (DECL_SIZE_UNIT (tmp)))
+ if (!tree_fits_poly_uint64_p (DECL_SIZE_UNIT (tmp)))
force_constant_size (tmp);
DECL_CONTEXT (tmp) = current_function_decl;