From: Sven Verdoolaege Date: Sun, 14 Nov 2010 13:11:42 +0000 (+0100) Subject: isl_printer_print_pw_qpolynomial{,_fold}: always print special domains X-Git-Tag: isl-0.05~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9149cbdb3d852e5c4575f2eeddc51c8cfa69c05b;p=platform%2Fupstream%2Fisl.git isl_printer_print_pw_qpolynomial{,_fold}: always print special domains If the domain of a piecewise quasipolynomial (fold) is the zero-dimensional space, then we don't print the "[] -> " to avoid clutter. However, if the domain has a name or if it has internal structure then it should be printed explicitly as otherwise no distinction can be made with the unnamed unstructured zero-dimensional space. Signed-off-by: Sven Verdoolaege --- diff --git a/isl_output.c b/isl_output.c index 6f81e1a..305b9cb 100644 --- a/isl_output.c +++ b/isl_output.c @@ -1451,8 +1451,8 @@ static __isl_give isl_printer *isl_pwqp_print_isl_body( for (i = 0; i < pwqp->n; ++i) { if (i) p = isl_printer_print_str(p, "; "); - if (isl_dim_size(pwqp->p[i].set->dim, isl_dim_set) > 0 || - isl_dim_get_tuple_name(pwqp->p[i].set->dim, isl_dim_set)) { + if (isl_dim_size(pwqp->dim, isl_dim_set) > 0 || + isl_dim_is_named_or_nested(pwqp->dim, isl_dim_set)) { p = print_dim(pwqp->p[i].set->dim, p, 1, 0, NULL); p = isl_printer_print_str(p, " -> "); } @@ -1475,7 +1475,8 @@ static __isl_give isl_printer *print_pw_qpolynomial_isl( } p = isl_printer_print_str(p, "{ "); if (pwqp->n == 0) { - if (isl_dim_size(pwqp->dim, isl_dim_set) > 0) { + if (isl_dim_size(pwqp->dim, isl_dim_set) > 0 || + isl_dim_is_named_or_nested(pwqp->dim, isl_dim_set)) { p = print_dim(pwqp->dim, p, 1, 0, NULL); p = isl_printer_print_str(p, " -> "); } @@ -1512,7 +1513,8 @@ static __isl_give isl_printer *isl_pwf_print_isl_body( for (i = 0; i < pwf->n; ++i) { if (i) p = isl_printer_print_str(p, "; "); - if (isl_dim_size(pwf->p[i].set->dim, isl_dim_set) > 0) { + if (isl_dim_size(pwf->dim, isl_dim_set) > 0 || + isl_dim_is_named_or_nested(pwf->dim, isl_dim_set)) { p = print_dim(pwf->p[i].set->dim, p, 1, 0, NULL); p = isl_printer_print_str(p, " -> "); } @@ -1532,7 +1534,8 @@ static __isl_give isl_printer *print_pw_qpolynomial_fold_isl( } p = isl_printer_print_str(p, "{ "); if (pwf->n == 0) { - if (isl_dim_size(pwf->dim, isl_dim_set) > 0) { + if (isl_dim_size(pwf->dim, isl_dim_set) > 0 || + isl_dim_is_named_or_nested(pwf->dim, isl_dim_set)) { p = print_dim(pwf->dim, p, 1, 0, NULL); p = isl_printer_print_str(p, " -> "); }