#include <isl_local_space_private.h>
#include <isl_aff_private.h>
#include <isl_ast_build_expr.h>
+#include <isl_sort.h>
static const char *s_to[2] = { " -> ", " \\to " };
static const char *s_and[2] = { " and ", " \\wedge " };
return NULL;
}
-static int aff_split_cmp(const void *p1, const void *p2)
+static int aff_split_cmp(const void *p1, const void *p2, void *user)
{
const struct isl_aff_split *s1, *s2;
s1 = (const struct isl_aff_split *) p1;
goto error;
}
- qsort(split, map->n, sizeof(struct isl_aff_split), &aff_split_cmp);
+ if (isl_sort(split, map->n, sizeof(struct isl_aff_split),
+ &aff_split_cmp, NULL) < 0)
+ goto error;
n = map->n;
for (i = n - 1; i >= 1; --i) {