diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-15 07:10:20 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-15 07:10:20 +0000 |
commit | 19eec579a0bc51a7691aa62f65d3f3040b2a94d3 (patch) | |
tree | 3e08ed92479684ba002d8c7a8eaed82caf2a98c4 /gcc/graphite-poly.c | |
parent | e98472f06dec3b0d227a05f058a02ad0b1ff9f9b (diff) | |
download | gcc-19eec579a0bc51a7691aa62f65d3f3040b2a94d3.tar.gz |
Correct the use of ppl_Pointset_Powerset_C_Polyhedron_maximize.
2009-08-15 Sebastian Pop <sebastian.pop@amd.com>
PR middle-end/40981
* graphite-interchange.c (ppl_max_for_le): Moved...
* graphite-poly.c (pbb_number_of_iterations): Call ppl_max_for_le.
* graphite-ppl.c (ppl_max_for_le): ... here. Correct the use of
ppl_Pointset_Powerset_C_Polyhedron_maximize.
* graphite-ppl.h (ppl_max_for_le): Declared.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150789 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-poly.c')
-rw-r--r-- | gcc/graphite-poly.c | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c index 944c4bf2553..f9b93e4ee4c 100644 --- a/gcc/graphite-poly.c +++ b/gcc/graphite-poly.c @@ -711,35 +711,15 @@ pbb_number_of_iterations (poly_bb_p pbb, graphite_dim_t loop_depth, Value niter) { - ppl_dimension_type loop_iter = pbb_iterator_dim (pbb, loop_depth); ppl_Linear_Expression_t le; - ppl_Coefficient_t num, denom; - Value dv; - int maximum; ppl_dimension_type dim; - value_init (dv); - ppl_new_Coefficient (&num); - ppl_new_Coefficient (&denom); ppl_Pointset_Powerset_C_Polyhedron_space_dimension (PBB_DOMAIN (pbb), &dim); ppl_new_Linear_Expression_with_dimension (&le, dim); - ppl_set_coef (le, loop_iter, 1); - ppl_Pointset_Powerset_C_Polyhedron_maximize (PBB_DOMAIN (pbb), le, - num, denom, &maximum); - - if (maximum == 1) - { - ppl_Coefficient_to_mpz_t (num, niter); - ppl_Coefficient_to_mpz_t (denom, dv); - value_division (niter, niter, dv); - } - else - value_set_si (niter, -1); - - value_clear (dv); + ppl_set_coef (le, pbb_iterator_dim (pbb, loop_depth), 1); + value_set_si (niter, -1); + ppl_max_for_le (PBB_DOMAIN (pbb), le, niter); ppl_delete_Linear_Expression (le); - ppl_delete_Coefficient (num); - ppl_delete_Coefficient (denom); } #endif |