From e286e9ef5b9e1b3b8085f783da1b7e2c0989e6b9 Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Wed, 27 Jul 2011 16:57:36 +0200 Subject: [PATCH] Correct wrong usage of LC_OPT machinery. --- ir/be/bechordal_main.c | 8 ++++---- ir/be/bechordal_t.h | 6 +++--- ir/be/becopyheur4.c | 2 +- ir/be/becopyopt.c | 2 +- ir/be/bemain.c | 8 ++++---- ir/be/ia32/ia32_architecture.c | 20 +++++++------------- 6 files changed, 20 insertions(+), 26 deletions(-) diff --git a/ir/be/bechordal_main.c b/ir/be/bechordal_main.c index 7755ac7c5..90bb14c7a 100644 --- a/ir/be/bechordal_main.c +++ b/ir/be/bechordal_main.c @@ -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 }; diff --git a/ir/be/bechordal_t.h b/ir/be/bechordal_t.h index 66669db8a..6db38b31c 100644 --- a/ir/be/bechordal_t.h +++ b/ir/be/bechordal_t.h @@ -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]; diff --git a/ir/be/becopyheur4.c b/ir/be/becopyheur4.c index b7e873d55..f5fd8c975 100644 --- a/ir/be/becopyheur4.c +++ b/ir/be/becopyheur4.c @@ -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; diff --git a/ir/be/becopyopt.c b/ir/be/becopyopt.c index 84ab01a98..682828fe3 100644 --- a/ir/be/becopyopt.c +++ b/ir/be/becopyopt.c @@ -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; diff --git a/ir/be/bemain.c b/ir/be/bemain.c index af2cfe03f..f87534f67 100644 --- a/ir/be/bemain.c +++ b/ir/be/bemain.c @@ -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 }; diff --git a/ir/be/ia32/ia32_architecture.c b/ir/be/ia32/ia32_architecture.c index 7917a4a0f..798a88dd2 100644 --- a/ir/be/ia32/ia32_architecture.c +++ b/ir/be/ia32/ia32_architecture.c @@ -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 }; -- 2.20.1