Add interface to set schedule_maximize_band_depth
authorTobias Grosser <tobias@grosser.es>
Sun, 11 Dec 2011 23:21:52 +0000 (00:21 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 12 Dec 2011 19:55:22 +0000 (20:55 +0100)
Previously, schedule_maximize_band_depth could only be set with the
corresponding command line option. This patch adds two functions
to change this option when using isl as a library.

int isl_options_set_schedule_maximize_band_depth(
isl_ctx *ctx, int val);
int isl_options_get_schedule_maximize_band_depth(
isl_ctx *ctx);

Signed-off-by: Tobias Grosser <tobias@grosser.es>
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
doc/user.pod
include/isl/schedule.h
isl_options.c

index dbed4a2..c9e997a 100644 (file)
@@ -4128,6 +4128,10 @@ A representation of the band can be printed using
 =head3 Options
 
        #include <isl/schedule.h>
+       int isl_options_set_schedule_maximize_band_depth(
+               isl_ctx *ctx, int val);
+       int isl_options_get_schedule_maximize_band_depth(
+               isl_ctx *ctx);
        int isl_options_set_schedule_outer_zero_distance(
                isl_ctx *ctx, int val);
        int isl_options_get_schedule_outer_zero_distance(
@@ -4140,6 +4144,14 @@ A representation of the band can be printed using
 
 =over
 
+=item * maximize_band_depth
+
+If this option is set, we do not split bands at the point
+where we detect splitting is necessary. Instead, we
+backtrack and split bands as early as possible. This
+reduces the number of splits and maximizes the width of
+the bands. Wider bands give more possibilities for tiling.
+
 =item * schedule_outer_zero_distance
 
 It this option is set, then we try to construct schedules
index ba42256..4ff211d 100644 (file)
@@ -12,6 +12,9 @@ extern "C" {
 struct isl_schedule;
 typedef struct isl_schedule isl_schedule;
 
+int isl_options_set_schedule_maximize_band_depth(isl_ctx *ctx, int val);
+int isl_options_get_schedule_maximize_band_depth(isl_ctx *ctx);
+
 int isl_options_set_schedule_outer_zero_distance(isl_ctx *ctx, int val);
 int isl_options_get_schedule_outer_zero_distance(isl_ctx *ctx);
 
index f4b09e8..fd342f0 100644 (file)
@@ -157,6 +157,11 @@ ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args,
        gbr_only_first)
 
 ISL_CTX_SET_BOOL_DEF(isl_options, struct isl_options, isl_options_args,
+       schedule_maximize_band_depth)
+ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args,
+       schedule_maximize_band_depth)
+
+ISL_CTX_SET_BOOL_DEF(isl_options, struct isl_options, isl_options_args,
        schedule_split_parallel)
 ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args,
        schedule_split_parallel)