Use {lower,upper}_bound_in_type.
authorSebastian Pop <sebastian.pop@amd.com>
Mon, 8 Mar 2010 17:50:09 +0000 (17:50 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Mon, 8 Mar 2010 17:50:09 +0000 (17:50 +0000)
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

gcc/ChangeLog.graphite
gcc/graphite-sese-to-poly.c

index 57176add47ff6fe64d505c928f227c9af7661dc2..9dcdcdab99b52b5fa0d94bd5e4de0f3fe0fa8003 100644 (file)
@@ -1,3 +1,8 @@
+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
index 99d83d6bf3a67a09d1c72d773e5bbf9475a5eafa..11bddf85fd9096e109c7feb1f0f7090e9ce609c1 100644 (file)
@@ -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)
     {