From 22280f632d3b5a3ccb23dbd87709d476d54b8a10 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Thu, 30 Sep 2010 21:20:14 +0000 Subject: Outline lst_niter_for_loop. 2010-09-09 Sebastian Pop * 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. From-SVN: r164800 --- gcc/graphite-poly.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'gcc/graphite-poly.h') diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h index 5ed1b04..5f536a8 100644 --- a/gcc/graphite-poly.h +++ b/gcc/graphite-poly.h @@ -1062,6 +1062,19 @@ lst_remove_from_sequence (lst_p lst) LST_LOOP_FATHER (lst) = NULL; } +/* Sets NITER to the upper bound approximation of the number of + iterations of loop LST. */ + +static inline void +lst_niter_for_loop (lst_p lst, mpz_t niter) +{ + int depth = lst_depth (lst); + poly_bb_p pbb = LST_PBB (lst_find_first_pbb (lst)); + + gcc_assert (LST_LOOP_P (lst)); + pbb_number_of_iterations_at_time (pbb, psct_dynamic_dim (pbb, depth), niter); +} + /* Updates the scattering of PBB to be at the DEWEY number in the loop at depth LEVEL. */ -- cgit v1.1