From 6981dd3274e6753e50f66c8cbe17b37bd41708e5 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 2 Mar 2007 15:34:02 +0000 Subject: [PATCH] - No #ifdef WITH_LIBCORE anymore in backend, compilation without libcore was broken anyway so we always require it now - changed some #include "config.h" to the recommended #include --- ir/be/TEMPLATE/TEMPLATE_emitter.c | 3 +-- ir/be/TEMPLATE/TEMPLATE_gen_decls.c | 3 +-- ir/be/TEMPLATE/TEMPLATE_map_regs.c | 2 +- ir/be/TEMPLATE/TEMPLATE_new_nodes.c | 2 +- ir/be/TEMPLATE/TEMPLATE_transform.c | 3 +-- ir/be/TEMPLATE/bearch_TEMPLATE.c | 3 +-- ir/be/arm/bearch_arm.c | 5 ---- ir/be/be.h | 4 ---- ir/be/bearch.h | 4 ---- ir/be/beblocksched.c | 4 ---- ir/be/bechordal_main.c | 10 -------- ir/be/becopyheur2.c | 5 ---- ir/be/becopyheur3.c | 4 ---- ir/be/becopyilp.c | 8 +++---- ir/be/becopyopt.c | 12 +--------- ir/be/becopyopt.h | 6 ----- ir/be/beifg.c | 4 ---- ir/be/beilpsched.c | 36 +++-------------------------- ir/be/beilpsched.h | 12 ---------- ir/be/bejavacoal.c | 4 ---- ir/be/bejavacoal.h | 14 ----------- ir/be/belistsched.c | 6 ----- ir/be/belistsched.h | 10 -------- ir/be/bemain.c | 29 ----------------------- ir/be/bemodule.c | 3 --- ir/be/bemodule.h | 4 ---- ir/be/beprofile.c | 5 ---- ir/be/bera.h | 8 ------- ir/be/beraextern.c | 7 ------ ir/be/beschedrss.c | 8 +------ ir/be/beschedrss.h | 9 -------- ir/be/bespillremat.c | 8 ------- ir/be/bessadestrsimple.c | 4 ---- ir/be/firm/bearch_firm.c | 7 +----- ir/be/ia32/bearch_ia32.c | 4 ---- ir/be/mips/bearch_mips.c | 3 +-- 36 files changed, 16 insertions(+), 247 deletions(-) diff --git a/ir/be/TEMPLATE/TEMPLATE_emitter.c b/ir/be/TEMPLATE/TEMPLATE_emitter.c index 3fe41fa7c..010e6d336 100644 --- a/ir/be/TEMPLATE/TEMPLATE_emitter.c +++ b/ir/be/TEMPLATE/TEMPLATE_emitter.c @@ -1,8 +1,7 @@ /* TEMPLATE emitter */ /* $Id$ */ - #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif #include diff --git a/ir/be/TEMPLATE/TEMPLATE_gen_decls.c b/ir/be/TEMPLATE/TEMPLATE_gen_decls.c index 6c3ea9dc2..63f1fa151 100644 --- a/ir/be/TEMPLATE/TEMPLATE_gen_decls.c +++ b/ir/be/TEMPLATE/TEMPLATE_gen_decls.c @@ -3,9 +3,8 @@ * @date 14.02.2006 * @version $Id$ */ - #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif #include diff --git a/ir/be/TEMPLATE/TEMPLATE_map_regs.c b/ir/be/TEMPLATE/TEMPLATE_map_regs.c index cd2d0f592..ea3762bc7 100644 --- a/ir/be/TEMPLATE/TEMPLATE_map_regs.c +++ b/ir/be/TEMPLATE/TEMPLATE_map_regs.c @@ -3,7 +3,7 @@ * $Id$ */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif #include diff --git a/ir/be/TEMPLATE/TEMPLATE_new_nodes.c b/ir/be/TEMPLATE/TEMPLATE_new_nodes.c index 4d4a2d7c0..942857056 100644 --- a/ir/be/TEMPLATE/TEMPLATE_new_nodes.c +++ b/ir/be/TEMPLATE/TEMPLATE_new_nodes.c @@ -4,7 +4,7 @@ * $Id$ */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif #ifdef _WIN32 diff --git a/ir/be/TEMPLATE/TEMPLATE_transform.c b/ir/be/TEMPLATE/TEMPLATE_transform.c index 969760b7f..0d0d220c8 100644 --- a/ir/be/TEMPLATE/TEMPLATE_transform.c +++ b/ir/be/TEMPLATE/TEMPLATE_transform.c @@ -1,8 +1,7 @@ /* The codegenrator (transform FIRM into TEMPLATE FIRM */ /* $Id$ */ - #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif #include "irnode_t.h" diff --git a/ir/be/TEMPLATE/bearch_TEMPLATE.c b/ir/be/TEMPLATE/bearch_TEMPLATE.c index e7d99acb8..722761e8b 100644 --- a/ir/be/TEMPLATE/bearch_TEMPLATE.c +++ b/ir/be/TEMPLATE/bearch_TEMPLATE.c @@ -1,8 +1,7 @@ /* The main TEMPLATE backend driver file. */ /* $Id$ */ - #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif #include "pseudo_irg.h" diff --git a/ir/be/arm/bearch_arm.c b/ir/be/arm/bearch_arm.c index 8bcb2b30c..0f5694878 100644 --- a/ir/be/arm/bearch_arm.c +++ b/ir/be/arm/bearch_arm.c @@ -5,10 +5,8 @@ #include "config.h" #endif -#ifdef WITH_LIBCORE #include #include -#endif /* WITH_LIBCORE */ #include "pseudo_irg.h" #include "irgwalk.h" @@ -1125,8 +1123,6 @@ static const backend_params *arm_get_libfirm_params(void) { return &p; } -#ifdef WITH_LIBCORE - /* fpu set architectures. */ static const lc_opt_enum_int_items_t arm_fpu_items[] = { { "softfloat", ARM_FPU_ARCH_SOFTFLOAT }, @@ -1147,7 +1143,6 @@ static const lc_opt_table_entry_t arm_options[] = { LC_OPT_ENT_BOOL("gen_reg_names", "use generic register names", &arm_isa_template.gen_reg_names), { NULL } }; -#endif /* WITH_LIBCORE */ const arch_isa_if_t arm_isa_if = { arm_init, diff --git a/ir/be/be.h b/ir/be/be.h index 3b6fecdac..fdc9b9269 100644 --- a/ir/be/be.h +++ b/ir/be/be.h @@ -8,11 +8,7 @@ #include "dbginfo.h" #include "ifconv.h" -#ifdef WITH_LIBCORE -#include -#include #include -#endif /* WITH_LIBCORE */ #define LC_STOP_AND_RESET_TIMER(timer) do { lc_timer_stop(timer); lc_timer_reset(timer); } while(0) diff --git a/ir/be/bearch.h b/ir/be/bearch.h index b1ef98bc9..7b19678af 100644 --- a/ir/be/bearch.h +++ b/ir/be/bearch.h @@ -3,10 +3,6 @@ #include "firm_config.h" -#ifdef WITH_LIBCORE -#include -#endif - #include "firm_types.h" #include "bitset.h" diff --git a/ir/be/beblocksched.c b/ir/be/beblocksched.c index 2f3681d3d..abec3545d 100644 --- a/ir/be/beblocksched.c +++ b/ir/be/beblocksched.c @@ -28,11 +28,9 @@ #include "bemodule.h" #include "be.h" -#ifdef WITH_LIBCORE #include #include #include -#endif /* WITH_LIBCORE */ #ifdef WITH_ILP #include @@ -45,7 +43,6 @@ typedef enum _blocksched_algos_t { static int algo = BLOCKSCHED_GREEDY; -#ifdef WITH_LIBCORE static const lc_opt_enum_int_items_t blockschedalgo_items[] = { { "naiv", BLOCKSCHED_NAIV }, { "extbb", BLOCKSCHED_EXTBB }, @@ -64,7 +61,6 @@ static const lc_opt_table_entry_t be_blocksched_options[] = { LC_OPT_ENT_ENUM_INT ("algo", "the block scheduling algorithm", &algo_var), { NULL } }; -#endif /* * ____ _ diff --git a/ir/be/bechordal_main.c b/ir/be/bechordal_main.c index e98bc57f5..53b5e48c7 100644 --- a/ir/be/bechordal_main.c +++ b/ir/be/bechordal_main.c @@ -22,11 +22,9 @@ #include "iterator.h" #include "firm_config.h" -#ifdef WITH_LIBCORE #include #include #include -#endif /* WITH_LIBCORE */ #include "ircons_t.h" #include "irmode_t.h" @@ -316,7 +314,6 @@ static unsigned int count_insns(ir_graph *irg) return cnt; } -#ifdef WITH_LIBCORE /** * Initialize all timers. */ @@ -373,13 +370,6 @@ static void be_init_timer(be_options_t *main_opts) lc_timer_get_name(tmp), lc_timer_get_name(timer)); \ timer = tmp; \ } -#else - -#define BE_TIMER_INIT(main_opts) -#define BE_TIMER_PUSH(timer) -#define BE_TIMER_POP(timer) - -#endif /* WITH_LIBCORE */ /** * Perform things which need to be done per register class before spilling. diff --git a/ir/be/becopyheur2.c b/ir/be/becopyheur2.c index 1653a2d93..10ae5b671 100644 --- a/ir/be/becopyheur2.c +++ b/ir/be/becopyheur2.c @@ -9,10 +9,8 @@ #include "config.h" #endif -#ifdef WITH_LIBCORE #include #include -#endif /* WITH_LIBCORE */ #include #include @@ -48,8 +46,6 @@ static int max_depth = 20; static double constr_factor = 0.9; /* Options using libcore */ -#ifdef WITH_LIBCORE - static const lc_opt_enum_mask_items_t dump_items[] = { { "before", DUMP_BEFORE }, { "after", DUMP_AFTER }, @@ -81,7 +77,6 @@ void be_init_copyheur2(void) } BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyheur2); -#endif /* ____ _ _ diff --git a/ir/be/becopyheur3.c b/ir/be/becopyheur3.c index d8a452b26..73b7835b2 100644 --- a/ir/be/becopyheur3.c +++ b/ir/be/becopyheur3.c @@ -9,10 +9,8 @@ #include "config.h" #endif -#ifdef WITH_LIBCORE #include #include -#endif /* WITH_LIBCORE */ #include #include @@ -49,7 +47,6 @@ static unsigned dump_flags = 0; static int dbg_level = 0; -#ifdef WITH_LIBCORE static const lc_opt_enum_mask_items_t dump_items[] = { { "before", DUMP_BEFORE }, { "after", DUMP_AFTER }, @@ -78,7 +75,6 @@ void be_init_copyheur3(void) } BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyheur3); -#endif static void set_admissible_regs(be_java_coal_t *coal, copy_opt_t *co, ir_node *irn, int t_idx, int *col_map) { diff --git a/ir/be/becopyilp.c b/ir/be/becopyilp.c index 1dca9e65f..6fa870755 100644 --- a/ir/be/becopyilp.c +++ b/ir/be/becopyilp.c @@ -19,6 +19,9 @@ #include "bemodule.h" #include "error.h" +#include +#include + #ifdef WITH_ILP #define DUMP_ILP 1 @@ -29,9 +32,6 @@ static int solve_net = 1; static int solve_log = 0; static int dump_flags = 0; -#ifdef WITH_LIBCORE -#include -#include static const lc_opt_enum_mask_items_t dump_items[] = { { "ilp", DUMP_ILP }, { "sol", DUMP_SOL }, @@ -62,8 +62,6 @@ void be_init_copyilp(void) } BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copyilp); -#endif /* WITH_LIBCORE */ - #include "becopyilp_t.h" #include "beifg_t.h" diff --git a/ir/be/becopyopt.c b/ir/be/becopyopt.c index ac3c26650..0001f7f8c 100644 --- a/ir/be/becopyopt.c +++ b/ir/be/becopyopt.c @@ -45,10 +45,9 @@ #include "beirg_t.h" #include "error.h" -#ifdef WITH_LIBCORE #include #include -#endif /* WITH_LIBCORE */ +#include #define DUMP_BEFORE 1 #define DUMP_AFTER 2 @@ -66,7 +65,6 @@ static cost_fct_t cost_func = co_get_costs_exec_freq; static unsigned algo = CO_ALGO_HEUR2; static int improve = 1; -#ifdef WITH_LIBCORE static const lc_opt_enum_mask_items_t dump_items[] = { { "before", DUMP_BEFORE }, { "after", DUMP_AFTER }, @@ -148,8 +146,6 @@ void be_init_copycoal(void) } BE_REGISTER_MODULE_CONSTRUCTOR(be_init_copycoal); -#endif - #undef QUICK_AND_DIRTY_HACK @@ -1415,9 +1411,7 @@ static FILE *my_open(const be_chordal_env_t *env, const char *prefix, const char void co_driver(be_chordal_env_t *cenv) { -#ifdef WITH_LIBCORE lc_timer_t *timer = lc_timer_register("firm.be.copyopt", "runtime"); -#endif co_complete_stats_t before, after; copy_opt_t *co; co_algo_t *algo_func; @@ -1474,16 +1468,12 @@ void co_driver(be_chordal_env_t *cenv) algo_func = algos[algo].algo; -#ifdef WITH_LIBCORE lc_timer_reset_and_start(timer); -#endif was_optimal = algo_func(co); -#ifdef WITH_LIBCORE lc_timer_stop(timer); be_stat_ev("co_time", lc_timer_elapsed_msec(timer)); -#endif be_stat_ev_ull("co_optimal", was_optimal); diff --git a/ir/be/becopyopt.h b/ir/be/becopyopt.h index 0ef10ca88..8200b8f65 100644 --- a/ir/be/becopyopt.h +++ b/ir/be/becopyopt.h @@ -9,7 +9,6 @@ * - Register-constrained nodes * - Two-address code instructions */ - #ifndef _BECOPYOPT_H #define _BECOPYOPT_H @@ -18,11 +17,6 @@ #include "firm_types.h" #include "bechordal.h" -#ifdef WITH_LIBCORE -#include -extern void co_register_options(lc_opt_entry_t *grp); -#endif - /** * Flags for dumping the IFG. */ diff --git a/ir/be/beifg.c b/ir/be/beifg.c index 3b3b4394c..312c557d4 100644 --- a/ir/be/beifg.c +++ b/ir/be/beifg.c @@ -24,11 +24,9 @@ #include #endif -#ifdef WITH_LIBCORE #include #include #include -#endif /* WITH_LIBCORE */ #include "bitset.h" @@ -380,7 +378,6 @@ void be_ifg_check_sorted_to_file(const be_ifg_t *ifg, FILE *f) void be_ifg_check_performance(be_chordal_env_t *chordal_env) { -#ifdef WITH_LIBCORE int tests = BE_CH_PERFORMANCETEST_COUNT; coloring_t coloring; @@ -585,7 +582,6 @@ void be_ifg_check_performance(be_chordal_env_t *chordal_env) } chordal_env->ifg = old_if; -#endif /* WITH_LIBCORE */ } void be_ifg_dump_dot(be_ifg_t *ifg, ir_graph *irg, FILE *file, const be_ifg_dump_dot_cb_t *cb, void *self) diff --git a/ir/be/beilpsched.c b/ir/be/beilpsched.c index f1183dc3f..afaf33d5c 100644 --- a/ir/be/beilpsched.c +++ b/ir/be/beilpsched.c @@ -35,11 +35,9 @@ #include #include -#ifdef WITH_LIBCORE #include #include #include -#endif /* WITH_LIBCORE */ #include "be.h" #include "benode_t.h" @@ -159,15 +157,9 @@ typedef struct { /* check if a double value is within an epsilon environment of 0 */ #define LPP_VALUE_IS_0(dbl) (fabs((dbl)) <= 1e-10) -#ifdef WITH_LIBCORE - #define ilp_timer_push(t) lc_timer_push((t)) - #define ilp_timer_pop() lc_timer_pop() - #define ilp_timer_elapsed_usec(t) lc_timer_elapsed_usec((t)) -#else /* WITH_LIBCORE */ - #define ilp_timer_push(t) - #define ilp_timer_pop() - #define ilp_timer_elapsed_usec(t) 0.0 -#endif /* WITH_LIBCORE */ +#define ilp_timer_push(t) lc_timer_push((t)) +#define ilp_timer_pop() lc_timer_pop() +#define ilp_timer_elapsed_usec(t) lc_timer_elapsed_usec((t)) /* option variable */ static ilpsched_options_t ilp_opts = { @@ -177,7 +169,6 @@ static ilpsched_options_t ilp_opts = { "" /* no log file */ }; -#ifdef WITH_LIBCORE /* ILP options */ static const lc_opt_table_entry_t ilpsched_option_table[] = { LC_OPT_ENT_BOOL("regpress", "Use register pressure constraints", &ilp_opts.regpress), @@ -186,7 +177,6 @@ static const lc_opt_table_entry_t ilpsched_option_table[] = { LC_OPT_ENT_STR("lpp_log", "LPP logfile (stderr and stdout are supported)", ilp_opts.log_file, sizeof(ilp_opts.log_file)), { NULL } }; -#endif /* WITH_LIBCORE */ /* We need this global variable as we compare nodes dependent on heights, @@ -872,9 +862,7 @@ static void create_variables(be_ilpsched_env_t *env, lpp_t *lpp, be_ilpsched_irn unsigned num_block_var, num_nodes; ilpsched_block_attr_t *ba = get_ilpsched_block_attr(block_node); unsigned weigth_y = ba->n_interesting_nodes * ba->n_interesting_nodes; -#ifdef WITH_LIBCORE lc_timer_t *t_var = lc_timer_register("beilpsched_var", "create ilp variables"); -#endif /* WITH_LIBCORE */ ilp_timer_push(t_var); num_block_var = num_nodes = 0; @@ -1017,11 +1005,9 @@ static void create_assignment_and_precedence_constraints(be_ilpsched_env_t *env, ir_node *irn; ilpsched_block_attr_t *ba = get_ilpsched_block_attr(block_node); bitset_t *bs_block_irns = bitset_alloca(ba->block_last_idx); -#ifdef WITH_LIBCORE lc_timer_t *t_cst_assign = lc_timer_register("beilpsched_cst_assign", "create assignment constraints"); lc_timer_t *t_cst_dead = lc_timer_register("beilpsched_cst_assign_dead", "create dead node assignment constraints"); lc_timer_t *t_cst_prec = lc_timer_register("beilpsched_cst_prec", "create precedence constraints"); -#endif /* WITH_LIBCORE */ num_cst_assign = num_cst_prec = num_cst_dead = 0; foreach_linked_irns(ba->head_ilp_nodes, irn) { @@ -1154,9 +1140,7 @@ static void create_ressource_constraints(be_ilpsched_env_t *env, lpp_t *lpp, be_ char buf[1024]; unsigned num_cst_resrc = 0; ilpsched_block_attr_t *ba = get_ilpsched_block_attr(block_node); -#ifdef WITH_LIBCORE lc_timer_t *t_cst_rsrc = lc_timer_register("beilpsched_cst_rsrc", "create resource constraints"); -#endif /* WITH_LIBCORE */ ilp_timer_push(t_cst_rsrc); for (glob_type_idx = env->cpu->n_unit_types - 1; glob_type_idx >= 0; --glob_type_idx) { @@ -1212,9 +1196,7 @@ static void create_bundle_constraints(be_ilpsched_env_t *env, lpp_t *lpp, be_ilp unsigned num_cst_bundle = 0; unsigned n_instr_max = env->cpu->bundle_size * env->cpu->bundels_per_cycle; ilpsched_block_attr_t *ba = get_ilpsched_block_attr(block_node); -#ifdef WITH_LIBCORE lc_timer_t *t_cst_bundle = lc_timer_register("beilpsched_cst_bundle", "create bundle constraints"); -#endif /* WITH_LIBCORE */ ilp_timer_push(t_cst_bundle); for (t = 0; t < ba->max_steps; ++t) { @@ -1270,9 +1252,7 @@ static void create_dying_nodes_constraint(be_ilpsched_env_t *env, lpp_t *lpp, be unsigned t; unsigned num_cst = 0; ilpsched_block_attr_t *ba = get_ilpsched_block_attr(block_node); -#ifdef WITH_LIBCORE lc_timer_t *t_cst = lc_timer_register("beilpsched_cst_dying_nodes", "create dying nodes constraints"); -#endif /* WITH_LIBCORE */ ilp_timer_push(t_cst); /* check all time_steps */ @@ -1354,9 +1334,7 @@ static void create_alive_nodes_constraint(be_ilpsched_env_t *env, lpp_t *lpp, be ir_node *irn; unsigned num_cst = 0; ilpsched_block_attr_t *ba = get_ilpsched_block_attr(block_node); -#ifdef WITH_LIBCORE lc_timer_t *t_cst = lc_timer_register("beilpsched_cst_alive_nodes", "create alive nodes constraints"); -#endif /* WITH_LIBCORE */ ilp_timer_push(t_cst); /* for each node */ @@ -1439,9 +1417,7 @@ static void create_pressure_dead_constraint(be_ilpsched_env_t *env, lpp_t *lpp, ir_node *cur_irn; unsigned num_cst = 0; ilpsched_block_attr_t *ba = get_ilpsched_block_attr(block_node); -#ifdef WITH_LIBCORE lc_timer_t *t_cst = lc_timer_register("beilpsched_cst_pressure", "create pressure constraints"); -#endif /* WITH_LIBCORE */ ilp_timer_push(t_cst); /* y_{nt}^k is set for each node and timestep and unit type */ @@ -1540,9 +1516,7 @@ static void create_pressure_alive_constraint(be_ilpsched_env_t *env, lpp_t *lpp, ir_node *cur_irn; unsigned num_cst = 0; ilpsched_block_attr_t *ba = get_ilpsched_block_attr(block_node); -#ifdef WITH_LIBCORE lc_timer_t *t_cst = lc_timer_register("beilpsched_cst_pressure", "create pressure constraints"); -#endif /* WITH_LIBCORE */ ilp_timer_push(t_cst); /* y_{nt}^k is set for each node and timestep and unit type */ @@ -1621,9 +1595,7 @@ static void create_proj_keep_constraints(be_ilpsched_env_t *env, lpp_t *lpp, be_ ir_node *irn; unsigned num_cst = 0; ilpsched_block_attr_t *ba = get_ilpsched_block_attr(block_node); -#ifdef WITH_LIBCORE lc_timer_t *t_cst = lc_timer_register("beilpsched_cst_projkeep", "create proj and keep constraints"); -#endif /* WITH_LIBCORE */ ilp_timer_push(t_cst); /* check all nodes */ @@ -1906,7 +1878,6 @@ void be_ilp_sched(const be_irg_t *birg) { be_ilp_sched_finish_irg_ilp_schedule(sel, birg->irg, env.irg_env); } -#ifdef WITH_LIBCORE /** * Register ILP scheduler options. */ @@ -1917,7 +1888,6 @@ void be_init_ilpsched(void) lc_opt_add_table(sched_grp, ilpsched_option_table); } -#endif /* WITH_LIBCORE */ #else /* WITH_ILP */ diff --git a/ir/be/beilpsched.h b/ir/be/beilpsched.h index f20df66bc..7bf532b6b 100644 --- a/ir/be/beilpsched.h +++ b/ir/be/beilpsched.h @@ -123,16 +123,4 @@ struct _ilp_sched_selector_t { */ void be_ilp_sched(const be_irg_t *birg); -#ifdef WITH_LIBCORE - -#include -#include - -/** - * Register ILP scheduler options. - */ -void ilpsched_register_options(lc_opt_entry_t *grp); - -#endif /* WITH_LIBCORE */ - #endif /* _BEILPSCHED_H_ */ diff --git a/ir/be/bejavacoal.c b/ir/be/bejavacoal.c index 3ef97dbb5..297c9fab4 100644 --- a/ir/be/bejavacoal.c +++ b/ir/be/bejavacoal.c @@ -3,10 +3,8 @@ #include "config.h" #endif -#ifdef WITH_LIBCORE #include #include -#endif /* WITH_LIBCORE */ #ifdef _WIN32 #include @@ -37,7 +35,6 @@ static char cls_name[256] = "coalescing/mst/safe/Algo"; /* Name of the JVM dll/so */ static char jvm_lib[512] = { 0 }; -#ifdef WITH_LIBCORE static const lc_opt_table_entry_t options[] = { LC_OPT_ENT_STR ("jvm", "absolute path to jvm dll", jvm_lib, sizeof(jvm_lib)), LC_OPT_ENT_STR ("jar", "jar file of the coalescer", jar_file, sizeof(jar_file)), @@ -55,7 +52,6 @@ void be_init_javacoal(void) } BE_REGISTER_MODULE_CONSTRUCTOR(be_init_javacoal); -#endif /* WITH_LIBCORE */ #include diff --git a/ir/be/bejavacoal.h b/ir/be/bejavacoal.h index 2b19cd367..35f185ec6 100644 --- a/ir/be/bejavacoal.h +++ b/ir/be/bejavacoal.h @@ -5,20 +5,6 @@ struct _be_java_coal_t; typedef struct _be_java_coal_t be_java_coal_t; - -#ifdef WITH_LIBCORE - -#include -#include -#include "firm_config.h" - -/** - * Register libcore options. - */ -void be_java_coal_register_options(lc_opt_entry_t *grp); - -#endif /* WITH_LIBCORE */ - /** * Add an interference edge * @param n first node id. diff --git a/ir/be/belistsched.c b/ir/be/belistsched.c index 8d911ade1..4fc4a37f1 100644 --- a/ir/be/belistsched.c +++ b/ir/be/belistsched.c @@ -42,10 +42,8 @@ #include "bearch.h" #include "bestat.h" -#ifdef WITH_LIBCORE #include #include -#endif /* WITH_LIBCORE */ #define BE_SCHED_NODE(irn) (be_is_Keep(irn) || be_is_CopyKeep(irn) || be_is_RegParams(irn)) @@ -74,7 +72,6 @@ static list_sched_options_t list_sched_options = { BE_SCHED_PREP_NONE, /* no scheduling preparation */ }; -#ifdef WITH_LIBCORE /* schedule selector options. */ static const lc_opt_enum_int_items_t sched_select_items[] = { { "trivial", BE_SCHED_SELECT_TRIVIAL }, @@ -107,7 +104,6 @@ static const lc_opt_table_entry_t list_sched_option_table[] = { LC_OPT_ENT_ENUM_PTR("select", "node selector", &sched_select_var), { NULL } }; -#endif /* WITH_LIBCORE */ /** * All scheduling info needed per node. @@ -624,7 +620,6 @@ void list_sched(const be_irg_t *birg, be_options_t *be_opts) DEL_ARR_F(env.sched_info); } -#ifdef WITH_LIBCORE /** * Register list scheduler options. */ @@ -636,4 +631,3 @@ void be_init_listsched(void) { } BE_REGISTER_MODULE_CONSTRUCTOR(be_init_listsched); -#endif /* WITH_LIBCORE */ diff --git a/ir/be/belistsched.h b/ir/be/belistsched.h index 4a133c3a7..1ba7c5f28 100644 --- a/ir/be/belistsched.h +++ b/ir/be/belistsched.h @@ -3,7 +3,6 @@ * @date 20.10.2004 * @author Sebastian Hack */ - #ifndef _FIRM_LIST_SCHED #define _FIRM_LIST_SCHED @@ -145,13 +144,4 @@ extern const list_sched_selector_t *heuristic_selector; */ void list_sched(const be_irg_t *birg, be_options_t *be_opts); -#ifdef WITH_LIBCORE -#include - -/** - * Register list scheduler options. - */ -void list_sched_register_options(lc_opt_entry_t *grp); -#endif /* WITH_LIBCORE */ - #endif /* _FIRM_LIST_SCHED */ diff --git a/ir/be/bemain.c b/ir/be/bemain.c index c4262c5fa..50ad73f70 100644 --- a/ir/be/bemain.c +++ b/ir/be/bemain.c @@ -11,11 +11,9 @@ #include #include -#ifdef WITH_LIBCORE #include #include #include -#endif /* WITH_LIBCORE */ #include "obst.h" #include "bitset.h" @@ -85,8 +83,6 @@ static char config_file[256] = { 0 }; /* back end instruction set architecture to use */ static const arch_isa_if_t *isa_if = NULL; -#ifdef WITH_LIBCORE - /* possible dumping options */ static const lc_opt_enum_mask_items_t dump_items[] = { { "none", DUMP_NONE }, @@ -148,8 +144,6 @@ static const lc_opt_table_entry_t be_main_options[] = { { NULL } }; -#endif /* WITH_LIBCORE */ - static be_module_list_entry_t *isa_ifs = NULL; void be_register_isa_if(const char *name, const arch_isa_if_t *isa) @@ -162,7 +156,6 @@ void be_register_isa_if(const char *name, const arch_isa_if_t *isa) void be_opt_register(void) { -#ifdef WITH_LIBCORE lc_opt_entry_t *be_grp; static int run_once = 0; @@ -178,21 +171,16 @@ void be_opt_register(void) be_add_module_list_opt(be_grp, "isa", "the instruction set architecture", &isa_ifs, (void**) &isa_if); -#endif /* WITH_LIBCORE */ } /* Parse one argument. */ int be_parse_arg(const char *arg) { -#ifdef WITH_LIBCORE lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be"); if (strcmp(arg, "help") == 0 || (arg[0] == '?' && arg[1] == '\0')) { lc_opt_print_help(be_grp, stdout); return -1; } return lc_opt_from_single_arg(be_grp, NULL, arg, NULL); -#else - return 0; -#endif /* WITH_LIBCORE */ } /** The be parameters returned by default, all off. */ @@ -320,8 +308,6 @@ static void initialize_birg(be_irg_t *birg, ir_graph *irg, be_main_env_t *env) set_irg_phase_state(irg, phase_backend); } -#ifdef WITH_LIBCORE - #define BE_TIMER_PUSH(timer) \ if (be_options.timing == BE_TIME_ON) { \ int res = lc_timer_push(timer); \ @@ -344,15 +330,6 @@ static void initialize_birg(be_irg_t *birg, ir_graph *irg, be_main_env_t *env) #define BE_TIMER_ONLY(code) do { if (be_options.timing == BE_TIME_ON) { code; } } while(0) -#else - -#define BE_TIMER_PUSH(timer) -#define BE_TIMER_POP(timer) -#define BE_TIMER_ONLY(code) - -#endif /* WITH_LIBCORE */ - - /** * The Firm backend main loop. * Do architecture specific lowering for all graphs @@ -375,7 +352,6 @@ static void be_main_loop(FILE *file_handle, const char *cup_name) unsigned num_birgs; ir_graph **irg_list, **backend_irg_list; -#ifdef WITH_LIBCORE lc_timer_t *t_abi = NULL; lc_timer_t *t_codegen = NULL; lc_timer_t *t_sched = NULL; @@ -397,7 +373,6 @@ static void be_main_loop(FILE *file_handle, const char *cup_name) t_verify = lc_timer_register("verify", "graph verification"); t_other = lc_timer_register("other", "other"); } -#endif /* WITH_LIBCORE */ be_init_env(&env, file_handle); @@ -760,7 +735,6 @@ static void be_main_loop(FILE *file_handle, const char *cup_name) /* Main interface to the frontend. */ void be_main(FILE *file_handle, const char *cup_name) { -#ifdef WITH_LIBCORE lc_timer_t *t = NULL; /* The user specified another config file to read. do that now. */ @@ -786,7 +760,6 @@ void be_main(FILE *file_handle, const char *cup_name) #ifdef FIRM_STATISTICS be_init_stat_file(be_options.stat_file_name, cup_name); #endif -#endif /* WITH_LIBCORE */ /* never build code for pseudo irgs */ set_visit_pseudo_irgs(0); @@ -795,7 +768,6 @@ void be_main(FILE *file_handle, const char *cup_name) be_main_loop(file_handle, cup_name); -#ifdef WITH_LIBCORE if (be_options.timing == BE_TIME_ON) { lc_timer_stop(t); lc_timer_leave_high_priority(); @@ -809,7 +781,6 @@ void be_main(FILE *file_handle, const char *cup_name) #ifdef FIRM_STATISTICS be_close_stat_file(); #endif -#endif /* WITH_LIBCORE */ } /** The debug info retriever function. */ diff --git a/ir/be/bemodule.c b/ir/be/bemodule.c index aa0cdb869..ddc39c01e 100644 --- a/ir/be/bemodule.c +++ b/ir/be/bemodule.c @@ -94,7 +94,6 @@ void be_quit_modules(void) //--------------------------------------------------------------------------- -#ifdef WITH_LIBCORE typedef struct module_opt_data_t { void **var; be_module_list_entry_t * const *list_head; @@ -211,5 +210,3 @@ void be_add_module_list_opt(lc_opt_entry_t *grp, const char *name, set_opt_module, dump_opt_module, dump_opt_module_vals, NULL); } - -#endif /* WITH_LIBCORE */ diff --git a/ir/be/bemodule.h b/ir/be/bemodule.h index dfa67c567..e66545c5d 100644 --- a/ir/be/bemodule.h +++ b/ir/be/bemodule.h @@ -32,8 +32,6 @@ void be_quit_modules(void); //--------------------------------------------------------------------------- -#ifdef WITH_LIBCORE - #include typedef struct be_module_list_entry_t be_module_list_entry_t; @@ -47,5 +45,3 @@ void be_add_module_list_opt(lc_opt_entry_t *grp, const char *name, void **var); #endif - -#endif diff --git a/ir/be/beprofile.c b/ir/be/beprofile.c index debe3de31..100551ce9 100644 --- a/ir/be/beprofile.c +++ b/ir/be/beprofile.c @@ -48,11 +48,6 @@ #include "bechordal_t.h" -#ifdef WITH_LIBCORE -#include -#include -#endif /* WITH_LIBCORE */ - #include "beprofile.h" /** An entry in the id-to-location map */ diff --git a/ir/be/bera.h b/ir/be/bera.h index 9315f8dba..71ee792a4 100644 --- a/ir/be/bera.h +++ b/ir/be/bera.h @@ -9,9 +9,7 @@ #include "firm_config.h" -#ifdef WITH_LIBCORE #include -#endif #include "firm_types.h" @@ -20,8 +18,6 @@ #include "beirg.h" #include "bemodule.h" -#ifdef WITH_LIBCORE - typedef struct { lc_timer_t *t_prolog; /**< timer for prolog */ lc_timer_t *t_epilog; /**< timer for epilog */ @@ -37,10 +33,6 @@ typedef struct { } be_ra_timer_t; extern be_ra_timer_t *global_ra_timer; -#else -typedef void *be_ra_timer_t; -typedef void *lc_opt_entry_t; -#endif /* WITH_LIBCORE */ typedef struct be_ra_t { void (*allocate)(be_irg_t *bi); /**< allocate registers on a graph */ diff --git a/ir/be/beraextern.c b/ir/be/beraextern.c index 09cc2908b..b70cc2dd0 100644 --- a/ir/be/beraextern.c +++ b/ir/be/beraextern.c @@ -68,10 +68,8 @@ alloc ::= node-nr reg-nr . #include #include #include -#ifdef WITH_LIBCORE #include #include -#endif #include "set.h" #include "pset.h" @@ -784,9 +782,6 @@ static void be_ra_extern_main(be_irg_t *birg) { |_| *****************************************************************************/ -#ifdef WITH_LIBCORE - - static const lc_opt_enum_func_ptr_items_t ssa_destr_items[] = { { "simple", (int (*)(void)) be_ssa_destr_simple }, /* TODO make (void*) casts nicer */ { NULL, NULL } @@ -818,5 +813,3 @@ void be_init_raextern(void) { be_register_allocator("ext", &be_ra_external_allocator); } BE_REGISTER_MODULE_CONSTRUCTOR(be_init_raextern); - -#endif /* WITH_LIBCORE */ diff --git a/ir/be/beschedrss.c b/ir/be/beschedrss.c index 5ee85b59c..8df283810 100644 --- a/ir/be/beschedrss.c +++ b/ir/be/beschedrss.c @@ -9,7 +9,7 @@ * @cvs-id $Id$ */ #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif #include @@ -38,10 +38,8 @@ #include "benode_t.h" #include "besched_t.h" -#ifdef WITH_LIBCORE #include #include -#endif /* WITH_LIBCORE */ #define ARR_LEN_SAFE(arr) ((arr) != NULL ? ARR_LEN((arr)) : 0) @@ -182,7 +180,6 @@ static rss_opts_t rss_options = { RSS_DUMP_NONE, }; -#ifdef WITH_LIBCORE static const lc_opt_enum_int_items_t dump_items[] = { { "none", RSS_DUMP_NONE }, { "cbc", RSS_DUMP_CBC }, @@ -202,7 +199,6 @@ static const lc_opt_table_entry_t rss_option_table[] = { LC_OPT_ENT_ENUM_MASK("dump", "dump phases", &dump_var), { NULL } }; -#endif /* WITH_LIBCORE */ /****************************************************************************** * _ _ __ _ _ @@ -2082,7 +2078,6 @@ static void process_block(ir_node *block, void *env) { phase_free(&rss->ph); } -#ifdef WITH_LIBCORE /** * Register the options. */ @@ -2095,7 +2090,6 @@ void be_init_schedrss(void) { } BE_REGISTER_MODULE_CONSTRUCTOR(be_init_schedrss); -#endif /* WITH_LIBCORE */ /** * Preprocess the irg for scheduling. diff --git a/ir/be/beschedrss.h b/ir/be/beschedrss.h index d170315e7..581fd6bda 100644 --- a/ir/be/beschedrss.h +++ b/ir/be/beschedrss.h @@ -11,15 +11,6 @@ #include "firm_config.h" -#ifdef WITH_LIBCORE -#include - -/** - * Register options for rss module. - */ -void rss_register_options(lc_opt_entry_t *grp); -#endif /* WITH_LIBCORE */ - /** * Perform RSS schedule preprocessing for the given irg. * @param birg The backend irg object diff --git a/ir/be/bespillremat.c b/ir/be/bespillremat.c index 5a289b17c..13f58f865 100644 --- a/ir/be/bespillremat.c +++ b/ir/be/bespillremat.c @@ -39,8 +39,6 @@ #include #include #include -//#include -//#include #include "be_t.h" #include "belive_t.h" @@ -58,10 +56,8 @@ #include "bechordal_t.h" -#ifdef WITH_LIBCORE #include #include -#endif /* WITH_LIBCORE */ #define DUMP_PROBLEM 1 #define DUMP_MPS 2 @@ -99,7 +95,6 @@ static double opt_cost_spill = 15.0; static double opt_cost_remat = 1.0; -#ifdef WITH_LIBCORE static const lc_opt_enum_mask_items_t dump_items[] = { { "problem", DUMP_PROBLEM }, { "mps", DUMP_MPS }, @@ -158,9 +153,6 @@ static const lc_opt_table_entry_t options[] = { { NULL } }; -#endif - - //#define EXECFREQ_LOOPDEPH /* compute execution frequency from loop depth only */ //#define SCHEDULE_PHIM /* insert phim nodes into schedule */ diff --git a/ir/be/bessadestrsimple.c b/ir/be/bessadestrsimple.c index d4b91a99c..8c84b2011 100644 --- a/ir/be/bessadestrsimple.c +++ b/ir/be/bessadestrsimple.c @@ -21,10 +21,6 @@ #include #include #include -#ifdef WITH_LIBCORE -#include -#include -#endif #include "set.h" #include "pset.h" diff --git a/ir/be/firm/bearch_firm.c b/ir/be/firm/bearch_firm.c index 426187d74..753c7ca11 100644 --- a/ir/be/firm/bearch_firm.c +++ b/ir/be/firm/bearch_firm.c @@ -1,13 +1,8 @@ - /** * ISA implementation for Firm IR nodes. */ #ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#ifdef WITH_LIBCORE -#include +#include #endif #include "bitset.h" diff --git a/ir/be/ia32/bearch_ia32.c b/ir/be/ia32/bearch_ia32.c index 36b89a79d..699df5cde 100644 --- a/ir/be/ia32/bearch_ia32.c +++ b/ir/be/ia32/bearch_ia32.c @@ -15,10 +15,8 @@ #include #endif -#ifdef WITH_LIBCORE #include #include -#endif /* WITH_LIBCORE */ #include @@ -2106,7 +2104,6 @@ static const backend_params *ia32_get_libfirm_params(void) { p.if_conv_info = &ifconv; return &p; } -#ifdef WITH_LIBCORE /* instruction set architectures. */ static const lc_opt_enum_int_items_t arch_items[] = { @@ -2173,7 +2170,6 @@ static const lc_opt_table_entry_t ia32_options[] = { LC_OPT_ENT_ENUM_INT("gasmode", "set the GAS compatibility mode", &gas_var), { NULL } }; -#endif /* WITH_LIBCORE */ const arch_isa_if_t ia32_isa_if = { ia32_init, diff --git a/ir/be/mips/bearch_mips.c b/ir/be/mips/bearch_mips.c index ae5be16ea..727603f51 100644 --- a/ir/be/mips/bearch_mips.c +++ b/ir/be/mips/bearch_mips.c @@ -1,8 +1,7 @@ /* The main mips backend driver file. */ /* $Id$ */ - #ifdef HAVE_CONFIG_H -#include "config.h" +#include #endif #include "pseudo_irg.h" -- 2.20.1