This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Do not constrain on REAL_TYPE


From: Aditya Kumar <aditya.k7@samsung.com>

gcc/ChangeLog:

2015-06-24  Aditya Kumar  <aditya.k7@samsung.com>
	    Sebastian Pop <s.pop@samsung.com>

        * graphite-sese-to-poly.c (parameter_index_in_region): Discard REAL_TYPE parameters.
        (scan_tree_for_params): Handle REAL_CST in scan_tree_for_params.
        (add_conditions_to_domain): Do not constrain on REAL_TYPE.

---
 gcc/graphite-sese-to-poly.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 271c499..5b37796 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -796,6 +796,9 @@ parameter_index_in_region (tree name, sese region)
 
   gcc_assert (SESE_ADD_PARAMS (region));
 
+  /* Cannot constrain on REAL_TYPE parameters.  */
+  if (TREE_CODE (TREE_TYPE (name)) == REAL_TYPE)
+    return -1;
   i = SESE_PARAMS (region).length ();
   SESE_PARAMS (region).safe_push (name);
   return i;
@@ -915,6 +918,7 @@ scan_tree_for_params (sese s, tree e)
 
     case INTEGER_CST:
     case ADDR_EXPR:
+    case REAL_CST:
       break;
 
    default:
@@ -1194,6 +1198,10 @@ add_conditions_to_domain (poly_bb_p pbb)
       {
       case GIMPLE_COND:
 	  {
+            /* Don't constrain on REAL_TYPE.  */
+	    if (TREE_CODE (TREE_TYPE (gimple_cond_lhs (stmt))) == REAL_TYPE)
+              break;
+
 	    gcond *cond_stmt = as_a <gcond *> (stmt);
 	    enum tree_code code = gimple_cond_code (cond_stmt);
 
-- 
2.1.0.243.g30d45f7


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]