diff options
author | Andreas Simbuerger <simbuerg@fim.uni-passau.de> | 2010-08-11 20:26:29 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2010-08-11 20:26:29 +0000 |
commit | 589ac63c0e4385caf707ed9a496cf541bc9bd6ab (patch) | |
tree | aa0d249fafd9afd47565cd6a7233df81b5380f28 /gcc/graphite-clast-to-gimple.c | |
parent | 3e40cb77a82cd82674c6b611fb3180f45cbd0bd5 (diff) | |
download | gcc-589ac63c0e4385caf707ed9a496cf541bc9bd6ab.zip gcc-589ac63c0e4385caf707ed9a496cf541bc9bd6ab.tar.gz gcc-589ac63c0e4385caf707ed9a496cf541bc9bd6ab.tar.bz2 |
Resolve CLooG's value_* macros to their respective mpz_* counterparts.
2010-07-04 Andreas Simbuerger <simbuerg@fim.uni-passau.de>
* graphite-clast-to-gimple.c
(precision_for_value): Resolve value_* calls to matching mpz_* calls.
(precision_for_interval): Same.
(gcc_type_for_interval): Same.
(compute_type_for_level): Same.
* graphite-interchange.c
(lst_interchange_profitable_p): Same.
* graphite-poly.c
(psct_scattering_dim_for_loop_depth): Same.
* graphite-ppl.c
(ppl_max_for_le_pointset): Same.
(ppl_min_for_le_pointset): Same.
From-SVN: r163133
Diffstat (limited to 'gcc/graphite-clast-to-gimple.c')
-rw-r--r-- | gcc/graphite-clast-to-gimple.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index 7eb9165..aca2c31 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -426,26 +426,26 @@ precision_for_value (mpz_t val) mpz_t x, y, two; int precision; - value_init (x); - value_init (y); - value_init (two); - value_set_si (x, 2); - value_assign (y, val); - value_set_si (two, 2); + mpz_init (x); + mpz_init (y); + mpz_init (two); + mpz_set_si (x, 2); + mpz_set (y, val); + mpz_set_si (two, 2); precision = 1; - if (value_neg_p (y)) - value_oppose (y, y); + if (mpz_sgn (y) < 0) + mpz_neg (y, y); - while (value_gt (y, x)) + while (mpz_cmp (y, x) > 0) { - value_multiply (x, x, two); + mpz_mul (x, x, two); precision++; } - value_clear (x); - value_clear (y); - value_clear (two); + mpz_clear (x); + mpz_clear (y); + mpz_clear (two); return precision; } @@ -459,12 +459,12 @@ precision_for_interval (mpz_t low, mpz_t up) mpz_t diff; int precision; - gcc_assert (value_le (low, up)); + gcc_assert (mpz_cmp (low, up) <= 0); - value_init (diff); - value_subtract (diff, up, low); + mpz_init (diff); + mpz_sub (diff, up, low); precision = precision_for_value (diff); - value_clear (diff); + mpz_clear (diff); return precision; } @@ -479,9 +479,9 @@ gcc_type_for_interval (mpz_t low, mpz_t up) tree type; enum machine_mode mode; - gcc_assert (value_le (low, up)); + gcc_assert (mpz_cmp (low, up) <= 0); - if (value_neg_p (low)) + if (mpz_sgn (low) < 0) unsigned_p = false; prec_up = precision_for_value (up); @@ -731,14 +731,14 @@ compute_type_for_level (poly_bb_p pbb, int level) mpz_t low, up; tree type; - value_init (low); - value_init (up); + mpz_init (low); + mpz_init (up); compute_bounds_for_level (pbb, level, low, up); type = gcc_type_for_interval (low, up); - value_clear (low); - value_clear (up); + mpz_clear (low); + mpz_clear (up); return type; } |