From 8d865c568a7b80e176c383afb0883c0a4c0b2024 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Tue, 25 Jan 2011 06:46:43 +0000 Subject: Pass 0 as the number of parameters to PIP when testing for integer feasibility. 2011-01-25 Sebastian Pop * 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 --- gcc/graphite-ppl.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'gcc/graphite-ppl.c') 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; } -- cgit v1.1