From 596f51095547912b6f78403b79498c4ed4d17bd2 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Mon, 12 Dec 2011 00:21:52 +0100 Subject: [PATCH] Add interface to set schedule_maximize_band_depth 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 Signed-off-by: Sven Verdoolaege --- doc/user.pod | 12 ++++++++++++ include/isl/schedule.h | 3 +++ isl_options.c | 5 +++++ 3 files changed, 20 insertions(+) diff --git a/doc/user.pod b/doc/user.pod index dbed4a2f..c9e997a9 100644 --- a/doc/user.pod +++ b/doc/user.pod @@ -4128,6 +4128,10 @@ A representation of the band can be printed using =head3 Options #include + 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 diff --git a/include/isl/schedule.h b/include/isl/schedule.h index ba42256e..4ff211dd 100644 --- a/include/isl/schedule.h +++ b/include/isl/schedule.h @@ -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); diff --git a/isl_options.c b/isl_options.c index f4b09e86..fd342f02 100644 --- a/isl_options.c +++ b/isl_options.c @@ -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) -- 2.11.4.GIT