Polly 23.0.0git
isl_drop_unused_params_templ.c
Go to the documentation of this file.
1/*
2 * Use of this software is governed by the MIT license
3 */
4
5#define xFN(TYPE,NAME) TYPE ## _ ## NAME
6#define FN(TYPE,NAME) xFN(TYPE,NAME)
7
8/* Drop all parameters not referenced by "obj".
9 */
10__isl_give TYPE *FN(TYPE,drop_unused_params)(__isl_take TYPE *obj)
11{
12 int i;
13 isl_size n;
14
15 n = FN(TYPE,dim)(obj, isl_dim_param);
16 if (n < 0 || FN(TYPE,check_named_params)(obj) < 0)
17 return FN(TYPE,free)(obj);
18
19 for (i = n - 1; i >= 0; i--) {
20 isl_bool involves;
21
22 involves = FN(TYPE,involves_dims)(obj, isl_dim_param, i, 1);
23 if (involves < 0)
24 return FN(TYPE,free)(obj);
25 if (!involves)
27 }
28
29 return obj;
30}
#define __isl_take
Definition ctx.h:22
#define __isl_give
Definition ctx.h:19
int isl_size
Definition ctx.h:97
isl_bool
Definition ctx.h:89
#define FN(TYPE, NAME)
static __isl_give isl_qpolynomial * drop_dims(__isl_take isl_qpolynomial *qp, void *user)
Definition isl_fold.c:373
const char * obj
Definition isl_test.c:3166
@ isl_dim_param
Definition space_type.h:15
n
Definition youcefn.c:8