Mercurial > hg > CbC > CbC_gcc
diff gcc/graphite-blocking.c @ 63:b7f97abdc517 gcc-4.6-20100522
update gcc from gcc-4.5.0 to gcc-4.6
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 May 2010 12:47:05 +0900 |
parents | 77e2b8dfacca |
children | f6334be47118 |
line wrap: on
line diff
--- a/gcc/graphite-blocking.c Fri Feb 12 23:41:23 2010 +0900 +++ b/gcc/graphite-blocking.c Mon May 24 12:47:05 2010 +0900 @@ -181,16 +181,16 @@ graphite_dim_t depth, int stride) { - Value niter, strip_stride; + mpz_t niter, strip_stride; bool res; - value_init (strip_stride); - value_init (niter); - value_set_si (strip_stride, stride); + mpz_init (strip_stride); + mpz_init (niter); + mpz_set_si (strip_stride, stride); pbb_number_of_iterations_at_time (pbb, psct_dynamic_dim (pbb, depth), niter); - res = value_gt (niter, strip_stride); - value_clear (strip_stride); - value_clear (niter); + res = (mpz_cmp (niter, strip_stride) > 0); + mpz_clear (strip_stride); + mpz_clear (niter); return res; } @@ -285,25 +285,27 @@ bool scop_do_block (scop_p scop) { - bool transform_done = false; + bool strip_mined = false; + bool interchanged = false; store_scattering (scop); - lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop)); - transform_done = scop_do_interchange (scop); + strip_mined = lst_do_strip_mine (SCOP_TRANSFORMED_SCHEDULE (scop)); + interchanged = scop_do_interchange (scop); /* If we don't interchange loops, then the strip mine is not profitable, and the transform is not a loop blocking. */ - if (!transform_done + if (!interchanged || !graphite_legal_transform (scop)) { restore_scattering (scop); return false; } - else if (dump_file && (dump_flags & TDF_DETAILS)) + else if (strip_mined && interchanged + && dump_file && (dump_flags & TDF_DETAILS)) fprintf (dump_file, "SCoP will be loop blocked.\n"); - return transform_done; + return strip_mined || interchanged; } #endif