isl_multi_aff_set_dim_name: do not set name of elements if type is isl_dim_out
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 16 Jul 2012 11:06:23 +0000 (13:06 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 16 Jul 2012 11:06:23 +0000 (13:06 +0200)
An isl_aff does not keep track of the name of its output dimension.
Even if it did, we would have to change the name of only the specified
element and not of all elements as we did before this commit.

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

index b316a31..b7d510f 100644 (file)
--- a/isl_aff.c
+++ b/isl_aff.c
@@ -2262,6 +2262,9 @@ __isl_give isl_multi_aff *isl_multi_aff_set_dim_name(
        maff->space = isl_space_set_dim_name(maff->space, type, pos, s);
        if (!maff->space)
                return isl_multi_aff_free(maff);
+
+       if (type == isl_dim_out)
+               return maff;
        for (i = 0; i < maff->n; ++i) {
                maff->p[i] = isl_aff_set_dim_name(maff->p[i], type, pos, s);
                if (!maff->p[i])