This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [GSoC] extend schedules

On 22/07/2014 18:00, Roman Gareev wrote:
I've attached the patch, which adds the extension of all schedules to
the maximal number of schedule dimensions. It is necessary for the
proper work of the isl AST generator. Is it fine for trunk?

                                    Cheers, Roman Gareev.


2014-07-22  Roman Gareev<>

	* graphite-isl-ast-to-gimple.c:
	(get_max_schedule_dimensions): New function.
	(extend_schedule): Likewise.
	(generate_isl_schedule): Add calling of extend_schedule.


Index: gcc/graphite-isl-ast-to-gimple.c
--- gcc/graphite-isl-ast-to-gimple.c	(revision 212913)
+++ gcc/graphite-isl-ast-to-gimple.c	(working copy)
@@ -685,12 +685,57 @@
    return isl_ast_build_from_context (context_isl);

+/* Get the maximal number of schedule dimensions in the scop SCOP.  */
+int get_max_schedule_dimensions (scop_p scop)
+  int i;
+  poly_bb_p pbb;
+  int schedule_dims = 0;
+  FOR_EACH_VEC_ELT (SCOP_BBS (scop), i, pbb)
+    {
+      int pbb_schedule_dims = isl_map_dim (pbb->transformed, isl_dim_out);
+      if (pbb_schedule_dims > schedule_dims)
+	schedule_dims = pbb_schedule_dims;
+    }
+  return schedule_dims;
+/* Extend the schedule to NB_SCHEDULE_DIMS schedule dimensions.
+   For schedules with different dimensionality, the isl AST generator can not
+   define an order and just randomly chooses an order.

                      and will just

Otherwise, LGTM.

Please commit.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]