X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=isl_options.c;h=f43e0bee8982c2804cce961880acad73a48e3560;hb=990ad28a4356f5743bed503fbdcb7e85747f727f;hp=92890d8af92a022343a65c20a0b71de6255e0939;hpb=7790c83aff93eb8352bd37e340c7ff9956315b8b;p=platform%2Fupstream%2Fisl.git diff --git a/isl_options.c b/isl_options.c index 92890d8..f43e0be 100644 --- a/isl_options.c +++ b/isl_options.c @@ -11,8 +11,9 @@ #include #include -#include "isl_ctx.h" -#include "isl_options.h" +#include +#include +#include struct isl_arg_choice isl_lp_solver_choice[] = { {"tab", ISL_LP_TAB}, @@ -53,7 +54,7 @@ struct isl_arg_choice isl_gbr_choice[] = { struct isl_arg_choice isl_closure_choice[] = { {"isl", ISL_CLOSURE_ISL}, - {"omega", ISL_CLOSURE_OMEGA}, + {"box", ISL_CLOSURE_BOX}, {0} }; @@ -63,6 +64,13 @@ static struct isl_arg_choice bound[] = { {0} }; +static struct isl_arg_choice on_error[] = { + {"warn", ISL_ON_ERROR_WARN}, + {"continue", ISL_ON_ERROR_CONTINUE}, + {"abort", ISL_ON_ERROR_ABORT}, + {0} +}; + static struct isl_arg_flags bernstein_recurse[] = { {"none", ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, 0}, {"factors", ISL_BERNSTEIN_FACTORS | ISL_BERNSTEIN_INTERVALS, @@ -74,7 +82,18 @@ static struct isl_arg_flags bernstein_recurse[] = { {0} }; -struct isl_arg isl_options_arg[] = { +static struct isl_arg_choice convex[] = { + {"wrap", ISL_CONVEX_HULL_WRAP}, + {"fm", ISL_CONVEX_HULL_FM}, + {0} +}; + +static void print_version(void) +{ + printf("%s", isl_version()); +} + +ISL_ARGS_START(struct isl_options, isl_options_args) ISL_ARG_CHOICE(struct isl_options, lp_solver, 0, "lp-solver", \ isl_lp_solver_choice, ISL_LP_TAB, "lp solver to use") ISL_ARG_CHOICE(struct isl_options, ilp_solver, 0, "ilp-solver", \ @@ -94,9 +113,69 @@ ISL_ARG_BOOL(struct isl_options, gbr_only_first, 0, "gbr-only-first", 0, "only perform basis reduction in first direction") ISL_ARG_CHOICE(struct isl_options, bound, 0, "bound", bound, ISL_BOUND_BERNSTEIN, "algorithm to use for computing bounds") +ISL_ARG_CHOICE(struct isl_options, on_error, 0, "on-error", on_error, + ISL_ON_ERROR_WARN, "how to react if an error is detected") ISL_ARG_FLAGS(struct isl_options, bernstein_recurse, 0, "bernstein-recurse", bernstein_recurse, ISL_BERNSTEIN_FACTORS, NULL) -ISL_ARG_END -}; +ISL_ARG_BOOL(struct isl_options, bernstein_triangulate, 0, + "bernstein-triangulate", 1, + "triangulate domains during Bernstein expansion") +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 " + ". 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, + "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") +ISL_ARG_VERSION(print_version) +ISL_ARGS_END + +ISL_ARG_DEF(isl_options, struct isl_options, isl_options_args) + +ISL_ARG_CTX_DEF(isl_options, struct isl_options, isl_options_args) + +ISL_CTX_SET_CHOICE_DEF(isl_options, struct isl_options, isl_options_args, bound) +ISL_CTX_GET_CHOICE_DEF(isl_options, struct isl_options, isl_options_args, bound) + +ISL_CTX_SET_CHOICE_DEF(isl_options, struct isl_options, isl_options_args, + on_error) +ISL_CTX_GET_CHOICE_DEF(isl_options, struct isl_options, isl_options_args, + on_error) + +ISL_CTX_SET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, + gbr_only_first) +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_parallel) +ISL_CTX_GET_BOOL_DEF(isl_options, struct isl_options, isl_options_args, + schedule_split_parallel) -ISL_ARG_DEF(isl_options, struct isl_options, isl_options_arg) +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)