OSDN Git Service

Use {lower,upper}_bound_in_type.
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Mar 2010 17:50:09 +0000 (17:50 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157291 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 57176ad..9dcdcda 100644 (file)
@@ -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.
 
index 99d83d6..11bddf8 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)
     {