From e620469bd088df7ba4e77e120ff4274692c44381 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Mon, 11 Jul 2011 13:55:23 +0200 Subject: [PATCH] isl_union_set_compute_schedule: make preference for large bands configurable The original code would always try to maximize the number of scheduling dimensions in a band, but this is not always desirable. Make this heuristic configurable and turn it off by default. Signed-off-by: Sven Verdoolaege --- include/isl/options.h | 1 + isl_options.c | 3 +++ isl_schedule.c | 3 +++ 3 files changed, 7 insertions(+) diff --git a/include/isl/options.h b/include/isl/options.h index f2a14b77..d280ab30 100644 --- a/include/isl/options.h +++ b/include/isl/options.h @@ -61,6 +61,7 @@ struct isl_options { int schedule_parametric; int schedule_outer_zero_distance; + int schedule_maximize_band_depth; int schedule_split_parallel; }; diff --git a/isl_options.c b/isl_options.c index 1879c7bc..1948c2bf 100644 --- a/isl_options.c +++ b/isl_options.c @@ -121,6 +121,9 @@ ISL_ARG_BOOL(struct isl_options, schedule_outer_zero_distance, 0, "schedule-outer-zero-distance", 0, "try to construct schedules with outer zero distances over " "proximity dependences") +ISL_ARG_BOOL(struct isl_options, schedule_maximize_band_depth, 0, + "schedule-maximize-band-depth", 0, + "maximize the number of scheduling dimensions in a band") ISL_ARG_BOOL(struct isl_options, schedule_split_parallel, 0, "schedule-split-parallel", 1, "split non-tilable bands with parallel schedules") diff --git a/isl_schedule.c b/isl_schedule.c index 90dadeed..320db6c2 100644 --- a/isl_schedule.c +++ b/isl_schedule.c @@ -2273,6 +2273,9 @@ static int compute_schedule_wcc(isl_ctx *ctx, struct isl_sched_graph *graph) return -1; if (sol->size == 0) { isl_vec_free(sol); + if (!ctx->opt->schedule_maximize_band_depth && + graph->n_total_row > graph->band_start) + return compute_next_band(ctx, graph); if (graph->src_scc >= 0) return compute_split_schedule(ctx, graph); if (graph->n_total_row > graph->band_start) -- 2.11.4.GIT