summaryrefslogtreecommitdiff
path: root/gcc/graphite-poly.h
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-30 21:20:14 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-30 21:20:14 +0000
commit63835205c45c386dfbf561f0b5fd3599e5a46d8b (patch)
tree003ca049fde25ae0d98ef11dffb6896fd2ae741c /gcc/graphite-poly.h
parent416d9c2481957c5f7146217d2a8bada91debd490 (diff)
downloadgcc-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-poly.h')
-rw-r--r--gcc/graphite-poly.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h
index 5ed1b048635..5f536a8529a 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. */