Correct wrong usage of LC_OPT machinery.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 27 Jul 2011 14:57:36 +0000 (16:57 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 27 Jul 2011 16:14:47 +0000 (18:14 +0200)
ir/be/bechordal_main.c
ir/be/bechordal_t.h
ir/be/becopyheur4.c
ir/be/becopyopt.c
ir/be/bemain.c
ir/be/ia32/ia32_architecture.c

index 7755ac7..90bb14c 100644 (file)
@@ -105,7 +105,7 @@ static const lc_opt_enum_int_items_t lower_perm_items[] = {
        { NULL, 0 }
 };
 
-static const lc_opt_enum_int_items_t dump_items[] = {
+static const lc_opt_enum_mask_items_t dump_items[] = {
        { "none",       BE_CH_DUMP_NONE       },
        { "spill",      BE_CH_DUMP_SPILL      },
        { "live",       BE_CH_DUMP_LIVE       },
@@ -132,7 +132,7 @@ static lc_opt_enum_int_var_t lower_perm_var = {
        &options.lower_perm_opt, lower_perm_items
 };
 
-static lc_opt_enum_int_var_t dump_var = {
+static lc_opt_enum_mask_var_t dump_var = {
        &options.dump_flags, dump_items
 };
 
@@ -141,9 +141,9 @@ static lc_opt_enum_int_var_t be_ch_vrfy_var = {
 };
 
 static const lc_opt_table_entry_t be_chordal_options[] = {
-       LC_OPT_ENT_ENUM_PTR ("perm",          "perm lowering options", &lower_perm_var),
+       LC_OPT_ENT_ENUM_INT ("perm",          "perm lowering options", &lower_perm_var),
        LC_OPT_ENT_ENUM_MASK("dump",          "select dump phases", &dump_var),
-       LC_OPT_ENT_ENUM_PTR ("verify",        "verify options", &be_ch_vrfy_var),
+       LC_OPT_ENT_ENUM_INT ("verify",        "verify options", &be_ch_vrfy_var),
        LC_OPT_LAST
 };
 
index 66669db..6db38b3 100644 (file)
@@ -109,9 +109,9 @@ enum {
 };
 
 struct be_ra_chordal_opts_t {
-       int dump_flags;
-       int lower_perm_opt;
-       int vrfy_option;
+       unsigned dump_flags;
+       int      lower_perm_opt;
+       int      vrfy_option;
 
        char ilp_server[128];
        char ilp_solver[128];
index b7e873d..f5fd8c9 100644 (file)
@@ -82,7 +82,7 @@ typedef float real_t;
 
 static unsigned last_chunk_id   = 0;
 static int recolor_limit        = 7;
-static real_t dislike_influence = REAL(0.1);
+static double dislike_influence = REAL(0.1);
 
 typedef struct col_cost_t {
        int     col;
index 84ab01a..682828f 100644 (file)
@@ -75,7 +75,7 @@
 
 static unsigned   dump_flags  = 0;
 static unsigned   style_flags = 0;
-static unsigned   do_stats    = 0;
+static int        do_stats    = 0;
 static cost_fct_t cost_func   = co_get_costs_exec_freq;
 static int        improve     = 1;
 
index af2cfe0..f87534f 100644 (file)
@@ -129,15 +129,15 @@ static const lc_opt_table_entry_t be_main_options[] = {
        LC_OPT_ENT_ENUM_MASK("dump",       "dump irg on several occasions",                       &dump_var),
        LC_OPT_ENT_BOOL     ("omitfp",     "omit frame pointer",                                  &be_options.omit_fp),
        LC_OPT_ENT_BOOL     ("pic",        "create PIC code",                                     &be_options.pic),
-       LC_OPT_ENT_ENUM_PTR ("verify",     "verify the backend irg",                              &verify_var),
+       LC_OPT_ENT_ENUM_INT ("verify",     "verify the backend irg",                              &verify_var),
        LC_OPT_ENT_BOOL     ("time",       "get backend timing statistics",                       &be_options.timing),
        LC_OPT_ENT_BOOL     ("profilegenerate", "instrument the code for execution count profiling",   &be_options.opt_profile_generate),
        LC_OPT_ENT_BOOL     ("profileuse",      "use existing profile data",                           &be_options.opt_profile_use),
        LC_OPT_ENT_BOOL     ("statev",     "dump statistic events",                               &be_options.statev),
-       LC_OPT_ENT_STR      ("filtev",     "filter for stat events (regex if support is active",  &be_options.filtev, sizeof(be_options.filtev)),
+       LC_OPT_ENT_STR      ("filtev",     "filter for stat events (regex if support is active",   be_options.filtev, sizeof(be_options.filtev)),
 
-       LC_OPT_ENT_STR ("ilp.server", "the ilp server name", &be_options.ilp_server, sizeof(be_options.ilp_server)),
-       LC_OPT_ENT_STR ("ilp.solver", "the ilp solver name", &be_options.ilp_solver, sizeof(be_options.ilp_solver)),
+       LC_OPT_ENT_STR ("ilp.server", "the ilp server name", be_options.ilp_server, sizeof(be_options.ilp_server)),
+       LC_OPT_ENT_STR ("ilp.solver", "the ilp solver name", be_options.ilp_solver, sizeof(be_options.ilp_solver)),
        LC_OPT_LAST
 };
 
index 7917a4a..798a88d 100644 (file)
@@ -232,19 +232,13 @@ static lc_opt_enum_int_var_t fp_unit_var = {
 };
 
 static const lc_opt_table_entry_t ia32_architecture_options[] = {
-       LC_OPT_ENT_BOOL("size",            "optimize for size", &opt_size),
-       LC_OPT_ENT_ENUM_INT("arch",        "select the instruction architecture",
-                           &arch_var),
-       LC_OPT_ENT_ENUM_INT("opt",         "optimize for instruction architecture",
-                           &opt_arch_var),
-       LC_OPT_ENT_ENUM_INT("fpunit",      "select the floating point unit",
-                           &fp_unit_var),
-       LC_OPT_ENT_NEGBIT("nooptcc",       "do not optimize calling convention",
-                         &opt_cc, 1),
-       LC_OPT_ENT_BIT("unsafe_floatconv", "do unsafe floating point controlword "
-                      "optimisations", &opt_unsafe_floatconv, 1),
-       LC_OPT_ENT_BOOL("machcode", "output machine code instead of assembler",
-                       &emit_machcode),
+       LC_OPT_ENT_BOOL    ("size",             "optimize for size",                                  &opt_size),
+       LC_OPT_ENT_ENUM_INT("arch",             "select the instruction architecture",                &arch_var),
+       LC_OPT_ENT_ENUM_INT("opt",              "optimize for instruction architecture",              &opt_arch_var),
+       LC_OPT_ENT_ENUM_INT("fpunit",           "select the floating point unit",                     &fp_unit_var),
+       LC_OPT_ENT_NEGBOOL ("nooptcc",          "do not optimize calling convention",                 &opt_cc),
+       LC_OPT_ENT_BOOL    ("unsafe_floatconv", "do unsafe floating point controlword optimisations", &opt_unsafe_floatconv),
+       LC_OPT_ENT_BOOL    ("machcode",         "output machine code instead of assembler",           &emit_machcode),
        LC_OPT_LAST
 };