From 32bb9cd68eb4e4a550475b5ab516fd1b8de22456 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 16 Jun 2011 13:50:54 +0200 Subject: [PATCH] remove remaining WITH_ILP uses, fix bug introduced when adapting lpp --- ir/be/beblocksched.c | 12 ++---------- ir/be/becopystat.c | 4 ---- ir/be/becopystat.h | 4 ---- ir/be/bemain.c | 2 -- ir/be/bemodule.c | 4 ---- ir/lpp/lpp_comm.c | 12 +++++++++++- 6 files changed, 13 insertions(+), 25 deletions(-) diff --git a/ir/be/beblocksched.c b/ir/be/beblocksched.c index 54c5bf2db..cbc96a844 100644 --- a/ir/be/beblocksched.c +++ b/ir/be/beblocksched.c @@ -61,10 +61,8 @@ #include "lc_opts.h" #include "lc_opts_enum.h" -#ifdef WITH_ILP -#include -#include -#endif /* WITH_ILP */ +#include "lpp.h" +#include "lpp_net.h" DEBUG_ONLY(static firm_dbg_module_t *dbg = NULL;) @@ -77,9 +75,7 @@ static int algo = BLOCKSCHED_GREEDY; static const lc_opt_enum_int_items_t blockschedalgo_items[] = { { "naiv", BLOCKSCHED_NAIV }, { "greedy", BLOCKSCHED_GREEDY }, -#ifdef WITH_ILP { "ilp", BLOCKSCHED_ILP }, -#endif /* WITH_ILP */ { NULL, 0 } }; @@ -534,7 +530,6 @@ static ir_node **create_block_schedule_greedy(ir_graph *irg, ir_exec_freq *execf * */ -#ifdef WITH_ILP typedef struct ilp_edge_t { ir_node *block; /**< source block */ int pos; /**< number of cfg predecessor (target) */ @@ -712,7 +707,6 @@ static ir_node **create_block_schedule_ilp(ir_graph *irg, ir_exec_freq *execfreq return block_list; } -#endif /* WITH_ILP */ /* * __ __ _ @@ -740,10 +734,8 @@ ir_node **be_create_block_schedule(ir_graph *irg) case BLOCKSCHED_GREEDY: case BLOCKSCHED_NAIV: return create_block_schedule_greedy(irg, execfreqs); -#ifdef WITH_ILP case BLOCKSCHED_ILP: return create_block_schedule_ilp(irg, execfreqs); -#endif /* WITH_ILP */ } panic("unknown blocksched algo"); diff --git a/ir/be/becopystat.c b/ir/be/becopystat.c index d3447c4ce..1c36a1774 100644 --- a/ir/be/becopystat.c +++ b/ir/be/becopystat.c @@ -186,8 +186,6 @@ void copystat_add_heur_time(int time) curr_vals[I_HEUR_TIME] += time; } -#ifdef WITH_ILP - void copystat_add_ilp_5_sec_costs(int costs) { curr_vals[I_COPIES_5SEC] += costs; @@ -213,8 +211,6 @@ void copystat_add_ilp_iter(int iters) curr_vals[I_ILP_ITER] += iters; } -#endif /* WITH_ILP */ - /** * Opens a file named base.ext with the mode mode. */ diff --git a/ir/be/becopystat.h b/ir/be/becopystat.h index d02f51a46..7474693be 100644 --- a/ir/be/becopystat.h +++ b/ir/be/becopystat.h @@ -40,8 +40,6 @@ void copystat_add_heur_time(int time); void copystat_dump(ir_graph *irg); void copystat_dump_pretty(ir_graph *irg); -#ifdef WITH_ILP - void copystat_add_ilp_5_sec_costs(int costs); void copystat_add_ilp_30_sec_costs(int costs); void copystat_add_ilp_time(int time); @@ -49,6 +47,4 @@ void copystat_add_ilp_vars(int vars); void copystat_add_ilp_csts(int csts); void copystat_add_ilp_iter(int iters); -#endif /* WITH_ILP */ - #endif diff --git a/ir/be/bemain.c b/ir/be/bemain.c index 4a6d4628d..0eafb66f2 100644 --- a/ir/be/bemain.c +++ b/ir/be/bemain.c @@ -136,10 +136,8 @@ static const lc_opt_table_entry_t be_main_options[] = { 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)), -#ifdef WITH_ILP 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)), -#endif /* WITH_ILP */ LC_OPT_LAST }; diff --git a/ir/be/bemodule.c b/ir/be/bemodule.c index 7ba3f57cc..9bf6693ee 100644 --- a/ir/be/bemodule.c +++ b/ir/be/bemodule.c @@ -116,9 +116,7 @@ void be_init_modules(void) be_init_copyheur4(); be_init_copyheur(); be_init_copyheur2(); -#ifdef WITH_ILP be_init_copyilp2(); -#endif be_init_pbqp_coloring(); be_init_copynone(); be_init_copystat(); @@ -137,9 +135,7 @@ void be_init_modules(void) be_init_arch_amd64(); be_init_arch_TEMPLATE(); -#ifdef WITH_ILP be_init_copyilp(); -#endif /* WITH_ILP */ #if PLUGIN_IR_BE_STA be_init_arch_sta(); diff --git a/ir/lpp/lpp_comm.c b/ir/lpp/lpp_comm.c index ea0a0b241..ab0887fd1 100644 --- a/ir/lpp/lpp_comm.c +++ b/ir/lpp/lpp_comm.c @@ -49,7 +49,17 @@ struct _lpp_comm_t { char *r_buf; }; -static firm_dbg_module_t *dbg = NULL; +static inline firm_dbg_module_t *get_dbg_module(void) +{ + static firm_dbg_module_t *dbg = NULL; + if(!dbg) { + dbg = firm_dbg_register("lpp.comm"); + } + + return dbg; +} + +#define dbg get_dbg_module() /** * Try to read some bytes but block until a certain amount is read. -- 2.20.1