add isl_local_space_divs_known
authorSven Verdoolaege <skimo@kotnet.org>
Fri, 20 May 2011 09:23:31 +0000 (11:23 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Fri, 20 May 2011 13:10:00 +0000 (15:10 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_local_space.c
isl_local_space_private.h

index a74ef13..feb219b 100644 (file)
@@ -307,3 +307,17 @@ __isl_give isl_mat *isl_merge_divs(__isl_keep isl_mat *div1,
 
        return div;
 }
+
+int isl_local_space_divs_known(__isl_keep isl_local_space *ls)
+{
+       int i;
+
+       if (!ls)
+               return -1;
+
+       for (i = 0; i < ls->div->n_row; ++i)
+               if (isl_int_is_zero(ls->div->row[i][0]))
+                       return 0;
+
+       return 1;
+}
index b0760ed..f4e1141 100644 (file)
@@ -26,5 +26,6 @@ unsigned isl_local_space_offset(__isl_keep isl_local_space *ls,
 
 __isl_give isl_local_space *isl_local_space_replace_divs(
        __isl_take isl_local_space *ls, __isl_take isl_mat *div);
+int isl_local_space_divs_known(__isl_keep isl_local_space *ls);
 
 #endif