projects
/
platform
/
upstream
/
isl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'maint'
[platform/upstream/isl.git]
/
isl_polynomial.c
diff --git
a/isl_polynomial.c
b/isl_polynomial.c
index
ff3196f
..
7eae4f8
100644
(file)
--- a/
isl_polynomial.c
+++ b/
isl_polynomial.c
@@
-23,6
+23,7
@@
#include <isl_range.h>
#include <isl_local_space_private.h>
#include <isl_aff_private.h>
#include <isl_range.h>
#include <isl_local_space_private.h>
#include <isl_aff_private.h>
+#include <isl_config.h>
static unsigned pos(__isl_keep isl_dim *dim, enum isl_dim_type type)
{
static unsigned pos(__isl_keep isl_dim *dim, enum isl_dim_type type)
{
@@
-326,7
+327,7
@@
__isl_give struct isl_upoly_rec *isl_upoly_alloc_rec(struct isl_ctx *ctx,
isl_assert(ctx, size >= 0, return NULL);
rec = isl_calloc(ctx, struct isl_upoly_rec,
sizeof(struct isl_upoly_rec) +
isl_assert(ctx, size >= 0, return NULL);
rec = isl_calloc(ctx, struct isl_upoly_rec,
sizeof(struct isl_upoly_rec) +
-
(size - 1)
* sizeof(struct isl_upoly *));
+
size
* sizeof(struct isl_upoly *));
if (!rec)
return NULL;
if (!rec)
return NULL;
@@
-474,8
+475,6
@@
error:
__isl_give struct isl_upoly *isl_upoly_dup(__isl_keep struct isl_upoly *up)
{
__isl_give struct isl_upoly *isl_upoly_dup(__isl_keep struct isl_upoly *up)
{
- struct isl_upoly *dup;
-
if (!up)
return NULL;
if (!up)
return NULL;
@@
-799,7
+798,7
@@
__isl_give struct isl_upoly *isl_upoly_mul_rec(__isl_take struct isl_upoly *up1,
{
struct isl_upoly_rec *rec1;
struct isl_upoly_rec *rec2;
{
struct isl_upoly_rec *rec1;
struct isl_upoly_rec *rec2;
- struct isl_upoly_rec *res;
+ struct isl_upoly_rec *res
= NULL
;
int i, j;
int size;
int i, j;
int size;
@@
-1036,7
+1035,6
@@
void isl_qpolynomial_free(__isl_take isl_qpolynomial *qp)
__isl_give struct isl_upoly *isl_upoly_var_pow(isl_ctx *ctx, int pos, int power)
{
int i;
__isl_give struct isl_upoly *isl_upoly_var_pow(isl_ctx *ctx, int pos, int power)
{
int i;
- struct isl_upoly *up;
struct isl_upoly_rec *rec;
struct isl_upoly_cst *cst;
struct isl_upoly_rec *rec;
struct isl_upoly_cst *cst;
@@
-2000,7
+1998,7
@@
static void invert_div(__isl_keep isl_qpolynomial *qp, int div,
*/
static __isl_give isl_qpolynomial *reduce_divs(__isl_take isl_qpolynomial *qp)
{
*/
static __isl_give isl_qpolynomial *reduce_divs(__isl_take isl_qpolynomial *qp)
{
- int i
, j
;
+ int i;
isl_vec *aff = NULL;
struct isl_upoly *s;
unsigned n_div;
isl_vec *aff = NULL;
struct isl_upoly *s;
unsigned n_div;
@@
-2206,6
+2204,7
@@
static __isl_give isl_qpolynomial *remove_redundant_divs(
int *reordering = NULL;
int redundant = 0;
int n_div;
int *reordering = NULL;
int redundant = 0;
int n_div;
+ isl_ctx *ctx;
if (!qp)
return NULL;
if (!qp)
return NULL;
@@
-2214,7
+2213,8
@@
static __isl_give isl_qpolynomial *remove_redundant_divs(
d = isl_dim_total(qp->dim);
len = qp->div->n_col - 2;
d = isl_dim_total(qp->dim);
len = qp->div->n_col - 2;
- active = isl_calloc_array(qp->ctx, int, len);
+ ctx = isl_qpolynomial_get_ctx(qp);
+ active = isl_calloc_array(ctx, int, len);
if (!active)
goto error;
if (!active)
goto error;
@@
-2525,7
+2525,6
@@
__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_mul(
{
int i, j, n;
struct isl_pw_qpolynomial *res;
{
int i, j, n;
struct isl_pw_qpolynomial *res;
- isl_set *set;
if (!pwqp1 || !pwqp2)
goto error;
if (!pwqp1 || !pwqp2)
goto error;
@@
-3760,8
+3759,6
@@
__isl_give isl_qpolynomial *isl_qpolynomial_morph(__isl_take isl_qpolynomial *qp
int i;
int n_sub;
isl_ctx *ctx;
int i;
int n_sub;
isl_ctx *ctx;
- struct isl_upoly *up;
- unsigned n_div;
struct isl_upoly **subs;
isl_mat *mat;
struct isl_upoly **subs;
isl_mat *mat;