scheduler: replace split_parallel by split_scaled option
[platform/upstream/isl.git] / isl_options.c
index 6301772..7d82b08 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <isl/ctx.h>
 #include <isl_options_private.h>
+#include <isl/schedule.h>
 #include <isl/version.h>
 
 struct isl_arg_choice isl_lp_solver_choice[] = {
@@ -71,6 +72,12 @@ static struct isl_arg_choice on_error[] = {
        {0}
 };
 
+static struct isl_arg_choice isl_schedule_algorithm_choice[] = {
+       {"isl",         ISL_SCHEDULE_ALGORITHM_ISL},
+       {"feautrier",   ISL_SCHEDULE_ALGORITHM_FEAUTRIER},
+       {0}
+};
+
 static struct isl_arg_flags bernstein_recurse[] = {
        {"none",        ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, 0},
        {"factors",     ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS,
@@ -88,6 +95,12 @@ static struct isl_arg_choice convex[] = {
        {0}
 };
 
+static struct isl_arg_choice fuse[] = {
+       {"max",         ISL_SCHEDULE_FUSE_MAX},
+       {"min",         ISL_SCHEDULE_FUSE_MIN},
+       {0}
+};
+
 static void print_version(void)
 {
        printf("%s", isl_version());
@@ -124,6 +137,10 @@ ISL_ARG_BOOL(struct isl_options, pip_symmetry, 0, "pip-symmetry", 1,
        "detect simple symmetries in PIP input")
 ISL_ARG_CHOICE(struct isl_options, convex, 0, "convex-hull", \
        convex, ISL_CONVEX_HULL_WRAP, "convex hull algorithm to use")
+ISL_ARG_INT(struct isl_options, schedule_max_constant_term, 0,
+       "schedule-max-constant-term", "limit", -1, "Only consider schedules "
+       "where the coefficients of the constant dimension do not exceed "
+       "<limit>. A value of -1 allows arbitrary coefficients.")
 ISL_ARG_BOOL(struct isl_options, schedule_parametric, 0,
        "schedule-parametric", 1, "construct possibly parametric schedules")
 ISL_ARG_BOOL(struct isl_options, schedule_outer_zero_distance, 0,
@@ -133,9 +150,14 @@ ISL_ARG_BOOL(struct isl_options, schedule_outer_zero_distance, 0,
 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")
+ISL_ARG_BOOL(struct isl_options, schedule_split_scaled, 0,
+       "schedule-split-scaled", 1,
+       "split non-tilable bands with scaled schedules")
+ISL_ARG_CHOICE(struct isl_options, schedule_algorithm, 0,
+       "schedule-algorithm", isl_schedule_algorithm_choice,
+       ISL_SCHEDULE_ALGORITHM_ISL, "scheduling algorithm to use")
+ISL_ARG_CHOICE(struct isl_options, schedule_fuse, 0, "schedule-fuse", fuse,
+       ISL_SCHEDULE_FUSE_MAX, "level of fusion during scheduling")
 ISL_ARG_VERSION(print_version)
 ISL_ARGS_END
 
@@ -156,7 +178,32 @@ ISL_CTX_SET_BOOL_DEF(isl_options, struct isl_options, isl_options_args,
 ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args,
        gbr_only_first)
 
+ISL_CTX_SET_INT_DEF(isl_options, struct isl_options, isl_options_args,
+       schedule_max_constant_term)
+ISL_CTX_GET_INT_DEF(isl_options, struct isl_options, isl_options_args,
+       schedule_max_constant_term)
+
+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_scaled)
+ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args,
+       schedule_split_scaled)
+
 ISL_CTX_SET_BOOL_DEF(isl_options, struct isl_options, isl_options_args,
        schedule_outer_zero_distance)
 ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args,
        schedule_outer_zero_distance)
+
+ISL_CTX_SET_CHOICE_DEF(isl_options, struct isl_options, isl_options_args,
+       schedule_algorithm)
+ISL_CTX_GET_CHOICE_DEF(isl_options, struct isl_options, isl_options_args,
+       schedule_algorithm)
+
+ISL_CTX_SET_CHOICE_DEF(isl_options, struct isl_options, isl_options_args,
+       schedule_fuse)
+ISL_CTX_GET_CHOICE_DEF(isl_options, struct isl_options, isl_options_args,
+       schedule_fuse)