da: remove inconsistencies from dependence relations
[ppn.git] / size_bernstein.cc
blobc69673a44b93923ba060e8e09673460b682ba1fe
1 #include <isl/polynomial.h>
2 #include "size.h"
3 #include "size_bernstein.h"
5 namespace size {
7 size::enumerator *selfloop_size_bernstein(pdg::PDG *pdg,
8 __isl_take isl_map *dep, __isl_take isl_set *read)
10 isl_pw_qpolynomial *pwqp;
11 isl_pw_qpolynomial_fold *ub;
13 pwqp = selfloop_tokens_in_fifo(dep, read);
15 ub = isl_pw_qpolynomial_bound(pwqp, isl_fold_max, NULL);
16 ub = isl_pw_qpolynomial_fold_coalesce(ub);
18 ub = isl_pw_qpolynomial_fold_gist(ub, pdg->get_context_isl_set());
20 return new size::enumerator(ub, pdg);