graphite-sese-to-poly.c (parameter_index_in_region): Only handle INTEGER_TYPE parameters.
authorAditya Kumar <aditya.k7@samsung.com>
Wed, 15 Jul 2015 21:36:49 +0000 (21:36 +0000)
committerSebastian Pop <spop@gcc.gnu.org>
Wed, 15 Jul 2015 21:36:49 +0000 (21:36 +0000)
        * graphite-sese-to-poly.c (parameter_index_in_region): Only handle
        INTEGER_TYPE parameters.
        (scan_tree_for_params): Handle REAL_CST, COMPLEX_CST, and
        VECTOR_CST in scan_tree_for_params.
        (add_conditions_to_domain): Only constrain on INTEGER_TYPE.

Co-Authored-By: Sebastian Pop <s.pop@samsung.com>
From-SVN: r225848

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

index 583309f..52110ee 100644 (file)
@@ -1,3 +1,12 @@
+2015-07-15  Aditya Kumar  <aditya.k7@samsung.com>
+           Sebastian Pop <s.pop@samsung.com>
+
+        * graphite-sese-to-poly.c (parameter_index_in_region): Only handle
+       INTEGER_TYPE parameters.
+        (scan_tree_for_params): Handle REAL_CST, COMPLEX_CST, and
+       VECTOR_CST in scan_tree_for_params.
+        (add_conditions_to_domain): Only constrain on INTEGER_TYPE.
+
 2015-07-15  Andrew MacLeod  <amacleod@redhat.com>
 
        * gimple-pretty-print.h: Don't include pretty-print.h.
index 5064247..ffc948f 100644 (file)
@@ -762,6 +762,10 @@ parameter_index_in_region (tree name, sese region)
 
   gcc_assert (TREE_CODE (name) == SSA_NAME);
 
+  /* Cannot constrain on anything else than INTEGER_TYPE parameters.  */
+  if (TREE_CODE (TREE_TYPE (name)) != INTEGER_TYPE)
+    return -1;
+
   i = parameter_index_in_region_1 (name, region);
   if (i != -1)
     return i;
@@ -887,6 +891,9 @@ scan_tree_for_params (sese s, tree e)
 
     case INTEGER_CST:
     case ADDR_EXPR:
+    case REAL_CST:
+    case COMPLEX_CST:
+    case VECTOR_CST:
       break;
 
    default:
@@ -1166,6 +1173,10 @@ add_conditions_to_domain (poly_bb_p pbb)
       {
       case GIMPLE_COND:
          {
+            /* Don't constrain on anything else than INTEGER_TYPE.  */
+           if (TREE_CODE (TREE_TYPE (gimple_cond_lhs (stmt))) != INTEGER_TYPE)
+              break;
+
            gcond *cond_stmt = as_a <gcond *> (stmt);
            enum tree_code code = gimple_cond_code (cond_stmt);