aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-poly.h
diff options
context:
space:
mode:
authorKonrad Trifunovic <konrad.trifunovic@gmail.com>2009-08-28 20:33:10 +0000
committerSebastian Pop <sebastian.pop@amd.com>2009-08-28 20:33:10 +0000
commit5dadeee6e4a9b2f4a8bcb1634c60f6740e871151 (patch)
tree69ac627cca7315fe48e0749b297818c7abab1f12 /gcc/graphite-poly.h
parent57fe83ce274257fe4f4d5335135e20728b6f713e (diff)
2009-08-28 Konrad Trifunovic <konrad.trifunovic@gmail.com>
Sebastian Pop <sebastian.pop@amd.com> * graphite-blocking.c (pbb_strip_mine_loop_depth): Renamed pbb_strip_mine_time_depth. Changed the implementation so that transformation is expressed as a transformation on time (scatttering) dimensions. Also, ensures that the 2d+1 scheduling format is preserved. (pbb_strip_mine_profitable_p): Profitability is based on the iteration number of a given time (scattering) dimension, and not on a original loop depth dimension. (pbb_strip_mine): Call pbb_number_of_iterations_at_time. (pbb_do_strip_mine): Call psct_dynamic_dim. * graphite-poly.c (pbb_number_of_iterations_at_time): New. * graphite-poly.h (pbb_number_of_iterations_at_time): Declared. (pbb_nb_dynamic_scattering_transform): New. (psct_dynamic_dim): New. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@151186 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-poly.h')
-rw-r--r--gcc/graphite-poly.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h
index a42e2429e0e..081e1861bdd 100644
--- a/gcc/graphite-poly.h
+++ b/gcc/graphite-poly.h
@@ -307,6 +307,7 @@ extern void debug_iteration_domains (scop_p);
extern bool scop_do_interchange (scop_p);
extern bool scop_do_strip_mine (scop_p);
extern void pbb_number_of_iterations (poly_bb_p, graphite_dim_t, Value);
+extern void pbb_number_of_iterations_at_time (poly_bb_p, graphite_dim_t, Value);
/* The index of the PBB. */
@@ -372,6 +373,17 @@ pbb_nb_scattering_transform (const struct poly_bb *pbb)
return PBB_NB_SCATTERING_TRANSFORM (pbb);
}
+/* The number of dynamic scattering dimensions in PBB. */
+
+static inline graphite_dim_t
+pbb_nb_dynamic_scattering_transform (const struct poly_bb *pbb)
+{
+ /* This function requires the 2d + 1 scattering format to be
+ invariant during all transformations. */
+ gcc_assert (PBB_NB_SCATTERING_TRANSFORM (pbb) % 2);
+ return PBB_NB_SCATTERING_TRANSFORM (pbb) / 2;
+}
+
/* Returns the number of local variables used in the transformed
scattering polyhedron of PBB. */
@@ -480,6 +492,19 @@ psct_parameter_dim (poly_bb_p pbb, graphite_dim_t param)
+ pbb_dim_iter_domain (pbb);
}
+/* The scattering dimension of PBB corresponding to the dynamic level
+ LEVEL. */
+
+static inline ppl_dimension_type
+psct_dynamic_dim (poly_bb_p pbb, graphite_dim_t level)
+{
+ graphite_dim_t result;
+ result = 1 + 2 * level;
+
+ gcc_assert (result < pbb_nb_scattering_transform (pbb));
+ return result;
+}
+
/* Adds to the transformed scattering polyhedron of PBB a new local
variable and returns its index. */