put options in a separate isl_options structure
[platform/upstream/isl.git] / isl_options.c
1 #include <stdio.h>
2 #include <stdlib.h>
3 #include <string.h>
4
5 #include "isl_ctx.h"
6 #include "isl_options.h"
7
8 struct isl_arg_choice isl_lp_solver_choice[] = {
9         {"tab",         ISL_LP_TAB},
10 #ifdef ISL_PIPLIB
11         {"pip",         ISL_LP_PIP},
12 #endif
13         {0}
14 };
15
16 struct isl_arg_choice isl_ilp_solver_choice[] = {
17         {"gbr",         ISL_ILP_GBR},
18 #ifdef ISL_PIPLIB
19         {"pip",         ISL_ILP_PIP},
20 #endif
21         {0}
22 };
23
24 struct isl_arg_choice isl_pip_solver_choice[] = {
25         {"tab",         ISL_PIP_TAB},
26 #ifdef ISL_PIPLIB
27         {"pip",         ISL_PIP_PIP},
28 #endif
29         {0}
30 };
31
32 struct isl_arg_choice isl_pip_context_choice[] = {
33         {"gbr",         ISL_CONTEXT_GBR},
34         {"lexmin",      ISL_CONTEXT_LEXMIN},
35         {0}
36 };
37
38 struct isl_arg_choice isl_gbr_choice[] = {
39         {"never",       ISL_GBR_NEVER},
40         {"once",        ISL_GBR_ONCE},
41         {"always",      ISL_GBR_ALWAYS},
42         {0}
43 };
44
45 struct isl_arg isl_options_arg[] = {
46 ISL_ARG_CHOICE(struct isl_options, lp_solver, 0, "lp-solver", \
47         isl_lp_solver_choice,   ISL_LP_TAB)
48 ISL_ARG_CHOICE(struct isl_options, ilp_solver, 0, "ilp-solver", \
49         isl_ilp_solver_choice,  ISL_ILP_GBR)
50 ISL_ARG_CHOICE(struct isl_options, pip, 0, "pip", \
51         isl_pip_solver_choice,  ISL_PIP_TAB)
52 ISL_ARG_CHOICE(struct isl_options, context, 0, "context", \
53         isl_pip_context_choice, ISL_CONTEXT_GBR)
54 ISL_ARG_CHOICE(struct isl_options, gbr, 0, "gbr", \
55         isl_gbr_choice, ISL_GBR_ONCE)
56 ISL_ARG_BOOL(struct isl_options, gbr_only_first, 0, "gbr-only-first", 0)
57 ISL_ARG_END
58 };
59
60 ISL_ARG_DEF(isl_options, struct isl_options, isl_options_arg)