aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-ppl.c
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2011-01-25 06:46:43 +0000
committerSebastian Pop <spop@gcc.gnu.org>2011-01-25 06:46:43 +0000
commit8d865c568a7b80e176c383afb0883c0a4c0b2024 (patch)
treee6ee73f80ee8bdceb97688e5e131adc303443de9 /gcc/graphite-ppl.c
parent50034a3643a48cf80224a61f73d71c61dc65d65b (diff)
downloadgcc-8d865c568a7b80e176c383afb0883c0a4c0b2024.zip
gcc-8d865c568a7b80e176c383afb0883c0a4c0b2024.tar.gz
gcc-8d865c568a7b80e176c383afb0883c0a4c0b2024.tar.bz2
Pass 0 as the number of parameters to PIP when testing for integer feasibility.
2011-01-25 Sebastian Pop <sebastian.pop@amd.com> * graphite-dependences.c (build_lexicographical_constraint): Remove the gdim parameter. (build_lexicographical_constraint): Adjust call to ppl_powerset_is_empty. (dependence_polyhedron): Same. (graphite_legal_transform_dr): Same. (graphite_carried_dependence_level_k): Same. * graphite-ppl.c (ppl_powerset_is_empty): Remove the nb_params parameter. * graphite-ppl.h (ppl_powerset_is_empty): Adjust declaration. From-SVN: r169209
Diffstat (limited to 'gcc/graphite-ppl.c')
-rw-r--r--gcc/graphite-ppl.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/gcc/graphite-ppl.c b/gcc/graphite-ppl.c
index 1a08362..9762ca4 100644
--- a/gcc/graphite-ppl.c
+++ b/gcc/graphite-ppl.c
@@ -516,35 +516,22 @@ debug_gmp_value (mpz_t val)
}
/* Checks for integer feasibility: returns true when the powerset
- polyhedron PS has no integer solutions. NB_PARAMS is the number of
- dimensions used as parameters in PS. If DIM is the dimension of
- PS, the parameter dimensions are in between DIM - NB_PARAMS and
- DIM. */
+ polyhedron PS has no integer solutions. */
bool
-ppl_powerset_is_empty (ppl_Pointset_Powerset_C_Polyhedron_t ps,
- int nb_params ATTRIBUTE_UNUSED)
+ppl_powerset_is_empty (ppl_Pointset_Powerset_C_Polyhedron_t ps)
{
ppl_PIP_Problem_t pip;
ppl_dimension_type d;
ppl_const_Constraint_System_t pcs;
ppl_Constraint_System_const_iterator_t first, last;
ppl_Pointset_Powerset_C_Polyhedron_iterator_t it, end;
- int i;
bool has_integer_solutions = false;
- ppl_dimension_type *ds;
- int dim_first_parameter;
if (ppl_Pointset_Powerset_C_Polyhedron_is_empty (ps))
return true;
ppl_Pointset_Powerset_C_Polyhedron_space_dimension (ps, &d);
- dim_first_parameter = d - nb_params;
- ds = (ppl_dimension_type *) XNEWVEC (ppl_dimension_type, nb_params);
-
- for (i = 0; i < nb_params; i++)
- ds[i] = dim_first_parameter + i;
-
ppl_new_Constraint_System_const_iterator (&first);
ppl_new_Constraint_System_const_iterator (&last);
ppl_new_Pointset_Powerset_C_Polyhedron_iterator (&it);
@@ -562,7 +549,7 @@ ppl_powerset_is_empty (ppl_Pointset_Powerset_C_Polyhedron_t ps,
ppl_Constraint_System_begin (pcs, first);
ppl_Constraint_System_end (pcs, last);
- ppl_new_PIP_Problem_from_constraints (&pip, d, first, last, nb_params, ds);
+ ppl_new_PIP_Problem_from_constraints (&pip, d, first, last, 0, NULL);
has_integer_solutions |= ppl_PIP_Problem_is_satisfiable (pip);
ppl_delete_PIP_Problem (pip);
@@ -572,8 +559,6 @@ ppl_powerset_is_empty (ppl_Pointset_Powerset_C_Polyhedron_t ps,
ppl_delete_Constraint_System_const_iterator (last);
ppl_delete_Pointset_Powerset_C_Polyhedron_iterator (it);
ppl_delete_Pointset_Powerset_C_Polyhedron_iterator (end);
- if (ds)
- free (ds);
return !has_integer_solutions;
}