aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Gareev <gareevroman@gmail.com>2014-07-20 09:44:36 +0000
committerRoman Gareev <romangareev@gcc.gnu.org>2014-07-20 09:44:36 +0000
commit55d1bd59572283e06cd7662dbbf0450b5fc98753 (patch)
tree32d4683fa3b8a47ce9f7036fe1e8834d3539aa1b
parent1c2afaca8911c5fef5c7bfa2df8f71bb0c529d37 (diff)
downloadgcc-55d1bd59572283e06cd7662dbbf0450b5fc98753.zip
gcc-55d1bd59572283e06cd7662dbbf0450b5fc98753.tar.gz
gcc-55d1bd59572283e06cd7662dbbf0450b5fc98753.tar.bz2
graphite-isl-ast-to-gimple.c: Add using of build_nonstandard_integer_type instead of int128_integer_type_node.
gcc/ * graphite-isl-ast-to-gimple.c: Add using of build_nonstandard_integer_type instead of int128_integer_type_node. From-SVN: r212863
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/graphite-isl-ast-to-gimple.c13
2 files changed, 15 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2edfb67..3909a88 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2014-07-20 Roman Gareev <gareevroman@gmail.com>
+
+ * graphite-isl-ast-to-gimple.c:
+ Add using of build_nonstandard_integer_type instead of
+ int128_integer_type_node
+
2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
* toplev.c (output_stack_usage): Adjust the location of the warning.
diff --git a/gcc/graphite-isl-ast-to-gimple.c b/gcc/graphite-isl-ast-to-gimple.c
index a8dfe7b..7fe158a 100644
--- a/gcc/graphite-isl-ast-to-gimple.c
+++ b/gcc/graphite-isl-ast-to-gimple.c
@@ -62,10 +62,14 @@ extern "C" {
static bool graphite_regenerate_error;
-/* We always use signed 128, until isl is able to give information about
-types */
+/* We always try to use signed 128 bit types, but fall back to smaller types
+ in case a platform does not provide types of these sizes. In the future we
+ should use isl to derive the optimal type for each subexpression. */
-static tree *graphite_expression_size_type = &int128_integer_type_node;
+static int max_mode_int_precision =
+ GET_MODE_PRECISION (mode_for_size (MAX_FIXED_MODE_SIZE, MODE_INT, 0));
+static int graphite_expression_type_precision = 128 <= max_mode_int_precision ?
+ 128 : max_mode_int_precision;
/* Converts a GMP constant VAL to a tree and returns it. */
@@ -494,7 +498,8 @@ graphite_create_new_loop_guard (edge entry_edge,
tree cond_expr;
edge exit_edge;
- *type = *graphite_expression_size_type;
+ *type =
+ build_nonstandard_integer_type (graphite_expression_type_precision, 0);
isl_ast_expr *for_init = isl_ast_node_for_get_init (node_for);
*lb = gcc_expression_from_isl_expression (*type, for_init, ip);
isl_ast_expr *upper_bound = get_upper_bound (node_for);