diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2010-03-08 17:50:09 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2010-03-08 17:50:09 +0000 |
commit | 697f511dd493265e176c9fe3c896fd90c115fac8 (patch) | |
tree | 81a6e238e9cc067cf7ed6b2cc2d0dc2c029e65de | |
parent | 456cc718b4434bf6f7e7628d8cfe07db2b173e17 (diff) | |
download | gcc-697f511dd493265e176c9fe3c896fd90c115fac8.zip gcc-697f511dd493265e176c9fe3c896fd90c115fac8.tar.gz gcc-697f511dd493265e176c9fe3c896fd90c115fac8.tar.bz2 |
Use {lower,upper}_bound_in_type.
2010-03-05 Sebastian Pop <sebastian.pop@amd.com>
* graphite-sese-to-poly.c (add_param_constraints): Use
lower_bound_in_type and upper_bound_in_type.
From-SVN: r157291
-rw-r--r-- | gcc/ChangeLog.graphite | 5 | ||||
-rw-r--r-- | gcc/graphite-sese-to-poly.c | 19 |
2 files changed, 14 insertions, 10 deletions
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 57176ad..9dcdcda 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,5 +1,10 @@ 2010-03-05 Sebastian Pop <sebastian.pop@amd.com> + * graphite-sese-to-poly.c (add_param_constraints): Use + lower_bound_in_type and upper_bound_in_type. + +2010-03-05 Sebastian Pop <sebastian.pop@amd.com> + * graphite-sese-to-poly.c (add_param_constraints): Use sizetype instead of unsigned_type_node. diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c index 99d83d6..11bddf8 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) { |