From d6abd6d8bde894f946209e897495ef093d7dd792 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Wed, 2 Jun 2010 16:39:47 +0000 Subject: [PATCH] Use smallest_mode_for_size for computing the precision types of new graphite IVs. 2010-06-02 Sebastian Pop * graphite-clast-to-gimple.c (gcc_type_for_interval): Use smallest_mode_for_size for computing the precision types of new graphite IVs. Do not call lang_hooks.types.type_for_size. From-SVN: r160165 --- gcc/ChangeLog | 6 ++++++ gcc/graphite-clast-to-gimple.c | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index de6cb5b76eb..915aa2d4b5b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-06-02 Sebastian Pop + + * graphite-clast-to-gimple.c (gcc_type_for_interval): Use + smallest_mode_for_size for computing the precision types of new + graphite IVs. Do not call lang_hooks.types.type_for_size. + 2010-06-02 Sebastian Pop * tree-if-conv.c (predicate_bbs): Do not reset the GIMPLE_DEBUG diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index b0e1a94bc25..3240c37f8cf 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -478,6 +478,7 @@ gcc_type_for_interval (mpz_t low, mpz_t up, tree old_type) bool unsigned_p = true; int precision, prec_up, prec_int; tree type; + enum machine_mode mode; gcc_assert (value_le (low, up)); @@ -490,7 +491,16 @@ gcc_type_for_interval (mpz_t low, mpz_t up, tree old_type) prec_int = precision_for_interval (low, up); precision = prec_up > prec_int ? prec_up : prec_int; - type = lang_hooks.types.type_for_size (precision, unsigned_p); + if (precision > BITS_PER_WORD) + { + gloog_error = true; + return integer_type_node; + } + + mode = smallest_mode_for_size (precision, MODE_INT); + precision = GET_MODE_PRECISION (mode); + type = build_nonstandard_integer_type (precision, unsigned_p); + if (!type) { gloog_error = true; -- 2.30.2