diff options
Diffstat (limited to 'polly/lib/External/isl/isl_union_neg.c')
| -rw-r--r-- | polly/lib/External/isl/isl_union_neg.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/polly/lib/External/isl/isl_union_neg.c b/polly/lib/External/isl/isl_union_neg.c index 4a3e7bb23ff..386b8dcd801 100644 --- a/polly/lib/External/isl/isl_union_neg.c +++ b/polly/lib/External/isl/isl_union_neg.c @@ -10,30 +10,16 @@ #include <isl_union_macro.h> -/* Replace *entry by its opposite. - * - * Return isl_stat_ok on success and isl_stat_error on error. +/* Return the opposite of "part". */ -static isl_stat FN(UNION,neg_entry)(void **entry, void *user) +static __isl_give PART *FN(UNION,neg_entry)(__isl_take PART *part, void *user) { - PW **pw = (PW **) entry; - - *pw = FN(PW,neg)(*pw); - - return *pw ? isl_stat_ok : isl_stat_error; + return FN(PART,neg)(part); } /* Return the opposite of "u". */ __isl_give UNION *FN(UNION,neg)(__isl_take UNION *u) { - u = FN(UNION,cow)(u); - if (!u) - return NULL; - - if (isl_hash_table_foreach(u->space->ctx, &u->table, - &FN(UNION,neg_entry), NULL) < 0) - return FN(UNION,free)(u); - - return u; + return FN(UNION,transform_inplace)(u, &FN(UNION,neg_entry), NULL); } |

