diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-30 21:20:14 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-30 21:20:14 +0000 |
commit | 63835205c45c386dfbf561f0b5fd3599e5a46d8b (patch) | |
tree | 003ca049fde25ae0d98ef11dffb6896fd2ae741c /gcc/graphite-blocking.c | |
parent | 416d9c2481957c5f7146217d2a8bada91debd490 (diff) | |
download | gcc-63835205c45c386dfbf561f0b5fd3599e5a46d8b.tar.gz |
Outline lst_niter_for_loop.
2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
* graphite-blocking.c (pbb_strip_mine_profitable_p): Renamed
lst_strip_mine_profitable_p. Call lst_niter_for_loop.
* graphite-poly.h (lst_niter_for_loop): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164800 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-blocking.c')
-rw-r--r-- | gcc/graphite-blocking.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/graphite-blocking.c b/gcc/graphite-blocking.c index 6e4334ad187..3951b603740 100644 --- a/gcc/graphite-blocking.c +++ b/gcc/graphite-blocking.c @@ -172,25 +172,25 @@ pbb_strip_mine_time_depth (poly_bb_p pbb, int time_depth, int stride) return true; } -/* Returns true when strip mining with STRIDE of the loop around PBB - at DEPTH is profitable. */ +/* Returns true when strip mining with STRIDE of the loop LST is + profitable. */ static bool -pbb_strip_mine_profitable_p (poly_bb_p pbb, - graphite_dim_t depth, - int stride) +lst_strip_mine_profitable_p (lst_p lst, int stride) { mpz_t niter, strip_stride; bool res; + gcc_assert (LST_LOOP_P (lst)); 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); + lst_niter_for_loop (lst, niter); res = (mpz_cmp (niter, strip_stride) > 0); + mpz_clear (strip_stride); mpz_clear (niter); - return res; } @@ -244,8 +244,7 @@ lst_do_strip_mine (lst_p lst) depth = lst_depth (lst); if (depth >= 0 - && pbb_strip_mine_profitable_p (LST_PBB (lst_find_first_pbb (lst)), - depth, stride)) + && lst_strip_mine_profitable_p (lst, stride)) { res |= lst_do_strip_mine_loop (lst, lst_depth (lst)); lst_add_loop_under_loop (lst); |