From 55d1bd59572283e06cd7662dbbf0450b5fc98753 Mon Sep 17 00:00:00 2001 From: Roman Gareev Date: Sun, 20 Jul 2014 09:44:36 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 6 ++++++ gcc/graphite-isl-ast-to-gimple.c | 13 +++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2edfb674060..3909a88f5e1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-07-20 Roman Gareev + + * graphite-isl-ast-to-gimple.c: + Add using of build_nonstandard_integer_type instead of + int128_integer_type_node + 2014-07-19 Eric Botcazou * 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 a8dfe7b62f1..7fe158a21bf 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);