From: Sebastian Pop Date: Mon, 8 Mar 2010 17:50:09 +0000 (+0000) Subject: Use {lower,upper}_bound_in_type. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=697f511dd493265e176c9fe3c896fd90c115fac8;p=gcc.git Use {lower,upper}_bound_in_type. 2010-03-05 Sebastian Pop * graphite-sese-to-poly.c (add_param_constraints): Use lower_bound_in_type and upper_bound_in_type. From-SVN: r157291 --- diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 57176add47f..9dcdcdab99b 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,3 +1,8 @@ +2010-03-05 Sebastian Pop + + * graphite-sese-to-poly.c (add_param_constraints): Use + lower_bound_in_type and upper_bound_in_type. + 2010-03-05 Sebastian Pop * graphite-sese-to-poly.c (add_param_constraints): Use sizetype diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index 99d83d6bf3a..11bddf85fd9 100644 --- a/gcc/graphite-sese-to-poly.c +++ b/gcc/graphite-sese-to-poly.c @@ -1502,16 +1502,15 @@ add_param_constraints (scop_p scop, ppl_Polyhedron_t context, graphite_dim_t p) tree lb = NULL_TREE; tree ub = NULL_TREE; - if (INTEGRAL_TYPE_P (type)) - { - lb = TYPE_MIN_VALUE (type); - ub = TYPE_MAX_VALUE (type); - } - else if (POINTER_TYPE_P (type)) - { - lb = TYPE_MIN_VALUE (sizetype); - ub = TYPE_MAX_VALUE (sizetype); - } + if (POINTER_TYPE_P (type) || !TYPE_MIN_VALUE (type)) + lb = lower_bound_in_type (type, type); + else + lb = TYPE_MIN_VALUE (type); + + if (POINTER_TYPE_P (type) || !TYPE_MAX_VALUE (type)) + ub = upper_bound_in_type (type, type); + else + ub = TYPE_MAX_VALUE (type); if (lb) {