]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
graphite-isl-ast-to-gimple.c: Add using of build_nonstandard_integer_type instead...
authorRoman Gareev <gareevroman@gmail.com>
Sun, 20 Jul 2014 09:44:36 +0000 (09:44 +0000)
committerRoman Gareev <romangareev@gcc.gnu.org>
Sun, 20 Jul 2014 09:44:36 +0000 (09:44 +0000)
gcc/
* graphite-isl-ast-to-gimple.c:
Add using of build_nonstandard_integer_type instead of
int128_integer_type_node.

From-SVN: r212863

gcc/ChangeLog
gcc/graphite-isl-ast-to-gimple.c

index 2edfb6740601914eaa1c6c3663652d3fbacc0a2a..3909a88f5e1e2f9bd14061e7a900fdc2eeb6f31c 100644 (file)
@@ -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.
index a8dfe7b62f11f9a3fe8114c3f3e317f9bdbea158..7fe158a21bf07fbadae0c0679dacec99ee22adbd 100644 (file)
@@ -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);