add isl_pw_multi_aff_get_pw_aff
[platform/upstream/isl.git] / isl_local_space.c
index 8a27e81..a57fff1 100644 (file)
@@ -532,6 +532,21 @@ __isl_give isl_local_space *isl_local_space_domain(
        return ls;
 }
 
+__isl_give isl_local_space *isl_local_space_range(
+       __isl_take isl_local_space *ls)
+{
+       ls = isl_local_space_drop_dims(ls, isl_dim_in,
+                                       0, isl_local_space_dim(ls, isl_dim_in));
+       ls = isl_local_space_cow(ls);
+       if (!ls)
+               return NULL;
+
+       ls->dim = isl_space_range(ls->dim);
+       if (!ls->dim)
+               return isl_local_space_free(ls);
+       return ls;
+}
+
 /* Construct a local space for a map that has the given local
  * space as domain and that has a zero-dimensional range.
  */