Commit 6981dd32 authored by Matthias Braun's avatar Matthias Braun
Browse files

- No #ifdef WITH_LIBCORE anymore in backend, compilation without libcore was...

- 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 <config.h>
parent 9c099ac2
/* TEMPLATE emitter */
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#include <config.h>
#endif
#include <limits.h>
......
......@@ -3,9 +3,8 @@
* @date 14.02.2006
* @version $Id$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include <config.h>
#endif
#include <stdlib.h>
......
......@@ -3,7 +3,7 @@
* $Id$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include <config.h>
#endif
#include <stdlib.h>
......
......@@ -4,7 +4,7 @@
* $Id$
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include <config.h>
#endif
#ifdef _WIN32
......
/* The codegenrator (transform FIRM into TEMPLATE FIRM */
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#include <config.h>
#endif
#include "irnode_t.h"
......
/* The main TEMPLATE backend driver file. */
/* $Id$ */
#ifdef HAVE_CONFIG_H
#include "config.h"
#include <config.h>
#endif
#include "pseudo_irg.h"
......
......@@ -5,10 +5,8 @@
#include "config.h"
#endif
#ifdef WITH_LIBCORE
#include <libcore/lc_opts.h>
#include <libcore/lc_opts_enum.h>
#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,
......
......@@ -8,11 +8,7 @@
#include "dbginfo.h"
#include "ifconv.h"
#ifdef WITH_LIBCORE
#include <libcore/lc_opts.h>
#include <libcore/lc_opts_enum.h>
#include <libcore/lc_timing.h>
#endif /* WITH_LIBCORE */
#define LC_STOP_AND_RESET_TIMER(timer) do { lc_timer_stop(timer); lc_timer_reset(timer); } while(0)
......
......@@ -3,10 +3,6 @@
#include "firm_config.h"
#ifdef WITH_LIBCORE
#include <libcore/lc_opts.h>
#endif
#include "firm_types.h"
#include "bitset.h"
......
......@@ -28,11 +28,9 @@
#include "bemodule.h"
#include "be.h"
#ifdef WITH_LIBCORE
#include <libcore/lc_opts.h>
#include <libcore/lc_opts_enum.h>
#include <libcore/lc_timing.h>
#endif /* WITH_LIBCORE */
#ifdef WITH_ILP
#include <lpp/lpp.h>
......@@ -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
/*
* ____ _
......
......@@ -22,11 +22,9 @@
#include "iterator.h"
#include "firm_config.h"
#ifdef WITH_LIBCORE
#include <libcore/lc_opts.h>
#include <libcore/lc_opts_enum.h>
#include <libcore/lc_timing.h>
#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.
......
......@@ -9,10 +9,8 @@
#include "config.h"
#endif
#ifdef WITH_LIBCORE
#include <libcore/lc_opts.h>
#include <libcore/lc_opts_enum.h>
#endif /* WITH_LIBCORE */
#include <stdlib.h>
#include <limits.h>
......@@ -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
/*
____ _ _
......
......@@ -9,10 +9,8 @@
#include "config.h"
#endif
#ifdef WITH_LIBCORE
#include <libcore/lc_opts.h>
#include <libcore/lc_opts_enum.h>
#endif /* WITH_LIBCORE */
#include <stdlib.h>
#include <limits.h>
......@@ -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)
{
......
......@@ -19,6 +19,9 @@
#include "bemodule.h"
#include "error.h"
#include <libcore/lc_opts.h>
#include <libcore/lc_opts_enum.h>
#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 <libcore/lc_opts.h>
#include <libcore/lc_opts_enum.h>
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"
......
......@@ -45,10 +45,9 @@
#include "beirg_t.h"
#include "error.h"
#ifdef WITH_LIBCORE
#include <libcore/lc_timing.h>
#include <libcore/lc_opts.h>
#endif /* WITH_LIBCORE */
#include <libcore/lc_opts_enum.h>
#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);
......
......@@ -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 <libcore/lc_opts.h>
extern void co_register_options(lc_opt_entry_t *grp);
#endif
/**
* Flags for dumping the IFG.
*/
......
......@@ -24,11 +24,9 @@
#include <alloca.h>
#endif
#ifdef WITH_LIBCORE
#include <libcore/lc_opts.h>
#include <libcore/lc_opts_enum.h>
#include <libcore/lc_timing.h>
#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)
......
......@@ -35,11 +35,9 @@
#include <lpp/lpp.h>
#include <lpp/lpp_net.h>
#ifdef WITH_LIBCORE
#include <libcore/lc_opts.h>
#include <libcore/lc_opts_enum.h>
#include <libcore/lc_timing.h>
#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 */
......
......@@ -123,16 +123,4 @@ struct _ilp_sched_selector_t {
*/
void be_ilp_sched(const be_irg_t *birg);
#ifdef WITH_LIBCORE
#include <libcore/lc_opts.h>
#include <libcore/lc_opts_enum.h>
/**
* Register ILP scheduler options.
*/
void ilpsched_register_options(lc_opt_entry_t *grp);
#endif /* WITH_LIBCORE */
#endif /* _BEILPSCHED_H_ */
......@@ -3,10 +3,8 @@
#include "config.h"
#endif
#ifdef WITH_LIBCORE
#include <libcore/lc_opts.h>
#include <libcore/lc_opts_enum.h>
#endif /* WITH_LIBCORE */
#ifdef _WIN32
#include <windows.h>
......@@ -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 <jni.h>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment