isl_space_align_params: accept general isl_spaces
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 11 Aug 2011 11:20:06 +0000 (13:20 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 3 Sep 2011 10:04:54 +0000 (12:04 +0200)
Before, we would only accept parameter spaces.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_space.c

index f0b14bc..b6e6b5a 100644 (file)
@@ -1448,8 +1448,9 @@ __isl_give isl_space *isl_space_align_params(__isl_take isl_space *dim1,
                        "parameter alignment requires named parameters",
                        goto error);
 
+       dim2 = isl_space_params(dim2);
        exp = isl_parameter_alignment_reordering(dim1, dim2);
-       isl_space_free(dim1);
+       exp = isl_reordering_extend_space(exp, dim1);
        isl_space_free(dim2);
        if (!exp)
                return NULL;