projects
/
platform
/
upstream
/
isl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fe114f
)
isl_pw_qpolynomial_intersect_domain: drop pieces that end up having empty domain
author
Sven Verdoolaege
<skimo@kotnet.org>
Thu, 5 Aug 2010 18:01:08 +0000
(20:01 +0200)
committer
Sven Verdoolaege
<skimo@kotnet.org>
Thu, 5 Aug 2010 18:01:08 +0000
(20:01 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
isl_pw_templ.c
patch
|
blob
|
history
diff --git
a/isl_pw_templ.c
b/isl_pw_templ.c
index
7aa329b
..
4a61e1a
100644
(file)
--- a/
isl_pw_templ.c
+++ b/
isl_pw_templ.c
@@
-311,10
+311,17
@@
__isl_give PW *FN(PW,intersect_domain)(__isl_take PW *pw, __isl_take isl_set *se
if (!pw)
goto error;
- for (i =
0; i < pw->n; ++
i) {
+ for (i =
pw->n - 1; i >= 0; --
i) {
pw->p[i].set = isl_set_intersect(pw->p[i].set, isl_set_copy(set));
if (!pw->p[i].set)
goto error;
+ if (isl_set_fast_is_empty(pw->p[i].set)) {
+ isl_set_free(pw->p[i].set);
+ FN(EL,free)(pw->p[i].FIELD);
+ if (i != pw->n - 1)
+ pw->p[i] = pw->p[pw->n - 1];
+ pw->n--;
+ }
}
isl_set_free(set);