Commit 423c8595 authored by Matthias Braun's avatar Matthias Braun
Browse files

- Several warning fixes

- Fixes for compilation without DEBUG_libfirm
- Fixed for compilation without WITH_LIBCORE (but it's still broken)
parent 3613034b
...@@ -43,6 +43,7 @@ typedef enum _blocksched_algos_t { ...@@ -43,6 +43,7 @@ typedef enum _blocksched_algos_t {
static int algo = BLOCKSCHED_GREEDY; static int algo = BLOCKSCHED_GREEDY;
#ifdef WITH_LIBCORE
static const lc_opt_enum_int_items_t blockschedalgo_items[] = { static const lc_opt_enum_int_items_t blockschedalgo_items[] = {
{ "naiv", BLOCKSCHED_NAIV }, { "naiv", BLOCKSCHED_NAIV },
{ "extbb", BLOCKSCHED_EXTBB }, { "extbb", BLOCKSCHED_EXTBB },
...@@ -61,6 +62,7 @@ static const lc_opt_table_entry_t be_blocksched_options[] = { ...@@ -61,6 +62,7 @@ static const lc_opt_table_entry_t be_blocksched_options[] = {
LC_OPT_ENT_ENUM_INT ("algo", "the block scheduling algorithm", &algo_var), LC_OPT_ENT_ENUM_INT ("algo", "the block scheduling algorithm", &algo_var),
{ NULL } { NULL }
}; };
#endif
/* /*
* ____ _ * ____ _
......
...@@ -139,10 +139,10 @@ static be_ra_chordal_opts_t options = { ...@@ -139,10 +139,10 @@ static be_ra_chordal_opts_t options = {
/** Enable extreme live range splitting. */ /** Enable extreme live range splitting. */
static int be_elr_split = 0; static int be_elr_split = 0;
#ifdef WITH_LIBCORE
/** Assumed loop iteration count for execution frequency estimation. */ /** Assumed loop iteration count for execution frequency estimation. */
static int be_loop_weight = 9; static int be_loop_weight = 9;
#ifdef WITH_LIBCORE
static be_ra_timer_t ra_timer = { static be_ra_timer_t ra_timer = {
NULL, NULL,
NULL, NULL,
...@@ -548,7 +548,7 @@ static be_ra_timer_t *be_ra_chordal_main(be_irg_t *birg) ...@@ -548,7 +548,7 @@ static be_ra_timer_t *be_ra_chordal_main(be_irg_t *birg)
const arch_isa_t *isa = arch_env_get_isa(main_env->arch_env); const arch_isa_t *isa = arch_env_get_isa(main_env->arch_env);
ir_graph *irg = birg->irg; ir_graph *irg = birg->irg;
be_options_t *main_opts = main_env->options; be_options_t *main_opts = main_env->options;
int splitted = 0; int splitted = 0;
int j, m; int j, m;
be_chordal_env_t chordal_env; be_chordal_env_t chordal_env;
...@@ -580,6 +580,7 @@ static be_ra_timer_t *be_ra_chordal_main(be_irg_t *birg) ...@@ -580,6 +580,7 @@ static be_ra_timer_t *be_ra_chordal_main(be_irg_t *birg)
chordal_env.border_heads = pmap_create(); chordal_env.border_heads = pmap_create();
chordal_env.ignore_colors = bitset_malloc(chordal_env.cls->n_regs); chordal_env.ignore_colors = bitset_malloc(chordal_env.cls->n_regs);
#ifdef FIRM_STATISTICS
if(be_stat_ev_is_active()) { if(be_stat_ev_is_active()) {
be_stat_tags[STAT_TAG_CLS] = chordal_env.cls->name; be_stat_tags[STAT_TAG_CLS] = chordal_env.cls->name;
be_stat_ev_push(be_stat_tags, STAT_TAG_LAST, be_stat_file); be_stat_ev_push(be_stat_tags, STAT_TAG_LAST, be_stat_file);
...@@ -588,17 +589,11 @@ static be_ra_timer_t *be_ra_chordal_main(be_irg_t *birg) ...@@ -588,17 +589,11 @@ static be_ra_timer_t *be_ra_chordal_main(be_irg_t *birg)
node_stats(&chordal_env, &node_stat); node_stats(&chordal_env, &node_stat);
be_stat_ev("phis_before_spill", node_stat.n_phis); be_stat_ev("phis_before_spill", node_stat.n_phis);
} }
#endif
/* put all ignore registers into the ignore register set. */ /* put all ignore registers into the ignore register set. */
put_ignore_colors(&chordal_env); put_ignore_colors(&chordal_env);
#if 0
BE_TIMER_PUSH(ra_timer.t_live);
be_liveness_recompute(birg->lv);
BE_TIMER_POP(ra_timer.t_live);
dump(BE_CH_DUMP_LIVE, irg, chordal_env.cls, "-live", dump_ir_block_graph_sched);
#endif
be_pre_spill_prepare_constr(&chordal_env); be_pre_spill_prepare_constr(&chordal_env);
dump(BE_CH_DUMP_CONSTR, irg, chordal_env.cls, "-constr-pre", dump_ir_block_graph_sched); dump(BE_CH_DUMP_CONSTR, irg, chordal_env.cls, "-constr-pre", dump_ir_block_graph_sched);
......
...@@ -953,7 +953,7 @@ static void process_cloud(co2_cloud_t *cloud) ...@@ -953,7 +953,7 @@ static void process_cloud(co2_cloud_t *cloud)
DBG((env->dbg, LEVEL_3, "mst:\n")); DBG((env->dbg, LEVEL_3, "mst:\n"));
for(i = 0; i < cloud->n_memb; ++i) { for(i = 0; i < cloud->n_memb; ++i) {
co2_cloud_irn_t *ci = cloud->seq[i]; DEBUG_ONLY(co2_cloud_irn_t *ci = cloud->seq[i]);
DBG((env->dbg, LEVEL_3, "\t%+F -> %+F\n", ci->inh.irn, ci->mst_parent->inh.irn)); DBG((env->dbg, LEVEL_3, "\t%+F -> %+F\n", ci->inh.irn, ci->mst_parent->inh.irn));
} }
......
...@@ -270,8 +270,8 @@ static int be_ifg_check_cmp_nodes(const void *a, const void *b) ...@@ -270,8 +270,8 @@ static int be_ifg_check_cmp_nodes(const void *a, const void *b)
const ir_node *node_a = *(ir_node **)a; const ir_node *node_a = *(ir_node **)a;
const ir_node *node_b = *(ir_node **)b; const ir_node *node_b = *(ir_node **)b;
int nr_a = node_a->node_nr; long nr_a = get_irn_node_nr(node_a);
int nr_b = node_b->node_nr; long nr_b = get_irn_node_nr(node_b);
return QSORT_CMP(nr_a, nr_b); return QSORT_CMP(nr_a, nr_b);
} }
......
...@@ -102,8 +102,11 @@ static void write_pointers(bitset_t *live, ifg_pointer_t *ifg) ...@@ -102,8 +102,11 @@ static void write_pointers(bitset_t *live, ifg_pointer_t *ifg)
ptr_head_t *element = ptr_get_new_head(ifg); ptr_head_t *element = ptr_get_new_head(ifg);
ir_node *irn = NULL; ir_node *irn = NULL;
#if 0
// Matze: huh, what is this?!? node numbers aren't in any way deterministic AFAIK
if (live_irn->node_nr == 1883 || live_irn->node_nr == 1858) if (live_irn->node_nr == 1883 || live_irn->node_nr == 1858)
irn = NULL; irn = NULL;
#endif
element->element = ifg->curr_element; /* write current highest sub-clique for each node */ element->element = ifg->curr_element; /* write current highest sub-clique for each node */
list_add(&element->list, &head->list); list_add(&element->list, &head->list);
...@@ -192,10 +195,12 @@ static void find_neighbour_walker(ir_node *bl, void *data) ...@@ -192,10 +195,12 @@ static void find_neighbour_walker(ir_node *bl, void *data)
{ {
ir_node *irn = b->irn; ir_node *irn = b->irn;
ptr_element_t *element = NULL; ptr_element_t *element = NULL;
int i = 0;
#if 0
// ?!?
if (irn->node_nr == 1883 || irn->node_nr == 1858) if (irn->node_nr == 1883 || irn->node_nr == 1858)
i=1; i=1;
#endif
if (b->is_def) /* b is a new node */ if (b->is_def) /* b is a new node */
{ {
...@@ -219,8 +224,11 @@ static void find_neighbour_walker(ir_node *bl, void *data) ...@@ -219,8 +224,11 @@ static void find_neighbour_walker(ir_node *bl, void *data)
element->content_second.irn = b->irn; element->content_second.irn = b->irn;
element->kind = 8888; /* both are ir_nodes */ element->kind = 8888; /* both are ir_nodes */
#if 0
// ?!?
if (irn->node_nr == 1883 || irn->node_nr == 1858 || irn->node_nr == 1936) if (irn->node_nr == 1883 || irn->node_nr == 1858 || irn->node_nr == 1936)
i=1; i=1;
#endif
last_element.element = element; last_element.element = element;
...@@ -296,8 +304,11 @@ static void find_neighbour_walker(ir_node *bl, void *data) ...@@ -296,8 +304,11 @@ static void find_neighbour_walker(ir_node *bl, void *data)
last_element.element = my_element; last_element.element = my_element;
ifg->curr_element = my_element; ifg->curr_element = my_element;
#if 0
// ?!?
if (my_irn->node_nr == 1883 || my_irn->node_nr == 1858 || my_irn->node_nr == 1936) if (my_irn->node_nr == 1883 || my_irn->node_nr == 1858 || my_irn->node_nr == 1936)
i=1; i=1;
#endif
first = NULL; first = NULL;
...@@ -394,14 +405,16 @@ static ir_node *get_next_neighbour(ptr_iter_t *it) ...@@ -394,14 +405,16 @@ static ir_node *get_next_neighbour(ptr_iter_t *it)
ir_node *res; ir_node *res;
ptr_head_t *head; ptr_head_t *head;
ptr_element_t *element; ptr_element_t *element;
static int i = 0;
element = it->curr_element_t; element = it->curr_element_t;
if (element == NULL) if (element == NULL)
{ {
#if 0
// ?!?
if (it->irn->node_nr == 1883 || it->irn->node_nr == 1858) if (it->irn->node_nr == 1883 || it->irn->node_nr == 1858)
i=1; i=1;
#endif
if (it->curr_ptr_head->list.next != &it->first_head->list) if (it->curr_ptr_head->list.next != &it->first_head->list)
{ {
......
...@@ -675,10 +675,10 @@ int be_check_dominance(ir_graph *irg) ...@@ -675,10 +675,10 @@ int be_check_dominance(ir_graph *irg)
pset *be_liveness_transfer(const arch_env_t *arch_env, const arch_register_class_t *cls, ir_node *irn, pset *live) pset *be_liveness_transfer(const arch_env_t *arch_env, const arch_register_class_t *cls, ir_node *irn, pset *live)
{ {
int i, n; int i, n;
ir_node *x;
FIRM_DBG_REGISTER(firm_dbg_module_t *dbg, DBG_MODULE); FIRM_DBG_REGISTER(firm_dbg_module_t *dbg, DBG_MODULE);
DEBUG_ONLY( DEBUG_ONLY(
const ir_node *x;
DBG((dbg, LEVEL_1, "%+F\n", irn)); DBG((dbg, LEVEL_1, "%+F\n", irn));
for(x = pset_first(live); x; x = pset_next(live)) for(x = pset_first(live); x; x = pset_next(live))
DBG((dbg, LEVEL_1, "\tlive: %+F\n", x)); DBG((dbg, LEVEL_1, "\tlive: %+F\n", x));
......
...@@ -7,8 +7,6 @@ ...@@ -7,8 +7,6 @@
#ifndef _BELIVE_T_H #ifndef _BELIVE_T_H
#define _BELIVE_T_H #define _BELIVE_T_H
#include "firm_config.h"
#include "irgraph_t.h" #include "irgraph_t.h"
#include "iredges_t.h" #include "iredges_t.h"
#include "irphase_t.h" #include "irphase_t.h"
...@@ -27,7 +25,7 @@ struct _be_lv_t { ...@@ -27,7 +25,7 @@ struct _be_lv_t {
ir_graph *irg; ir_graph *irg;
bitset_t *nodes; bitset_t *nodes;
hook_entry_t hook_info; hook_entry_t hook_info;
firm_dbg_module_t *dbg; DEBUG_ONLY(firm_dbg_module_t *dbg;)
}; };
struct _be_lv_info_node_t { struct _be_lv_info_node_t {
......
...@@ -503,12 +503,14 @@ static void be_main_loop(FILE *file_handle, const char *cup_name) ...@@ -503,12 +503,14 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
/* set the current graph (this is important for several firm functions) */ /* set the current graph (this is important for several firm functions) */
current_ir_graph = irg; current_ir_graph = irg;
#ifdef FIRM_STATISTICS
if(be_stat_ev_is_active()) { if(be_stat_ev_is_active()) {
ir_snprintf(irg_name, sizeof(irg_name), "%F", irg); ir_snprintf(irg_name, sizeof(irg_name), "%F", irg);
be_stat_tags[STAT_TAG_CLS] = "<all>"; be_stat_tags[STAT_TAG_CLS] = "<all>";
be_stat_tags[STAT_TAG_IRG] = irg_name; be_stat_tags[STAT_TAG_IRG] = irg_name;
be_stat_ev_push(be_stat_tags, STAT_TAG_LAST, be_stat_file); be_stat_ev_push(be_stat_tags, STAT_TAG_LAST, be_stat_file);
} }
#endif
/* stop and reset timers */ /* stop and reset timers */
BE_TIMER_ONLY( BE_TIMER_ONLY(
...@@ -654,20 +656,24 @@ static void be_main_loop(FILE *file_handle, const char *cup_name) ...@@ -654,20 +656,24 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
arch_code_generator_before_ra(birg->cg); arch_code_generator_before_ra(birg->cg);
BE_TIMER_POP(t_codegen); BE_TIMER_POP(t_codegen);
#ifdef FIRM_STATISTICS
if(be_stat_ev_is_active()) { if(be_stat_ev_is_active()) {
be_stat_ev_l("costs_before_ra", be_stat_ev_l("costs_before_ra",
(long) be_estimate_irg_costs(irg, env.arch_env, birg->exec_freq)); (long) be_estimate_irg_costs(irg, env.arch_env, birg->exec_freq));
} }
#endif
/* Do register allocation */ /* Do register allocation */
BE_TIMER_PUSH(t_regalloc); BE_TIMER_PUSH(t_regalloc);
ra_timer = ra->allocate(birg); ra_timer = ra->allocate(birg);
BE_TIMER_POP(t_regalloc); BE_TIMER_POP(t_regalloc);
#ifdef FIRM_STATISTICS
if(be_stat_ev_is_active()) { if(be_stat_ev_is_active()) {
be_stat_ev_l("costs_after_ra", be_stat_ev_l("costs_after_ra",
(long) be_estimate_irg_costs(irg, env.arch_env, birg->exec_freq)); (long) be_estimate_irg_costs(irg, env.arch_env, birg->exec_freq));
} }
#endif
dump(DUMP_RA, irg, "-ra", dump_ir_block_graph_sched); dump(DUMP_RA, irg, "-ra", dump_ir_block_graph_sched);
be_do_stat_nodes(irg, "06 Register Allocation"); be_do_stat_nodes(irg, "06 Register Allocation");
...@@ -782,7 +788,9 @@ static void be_main_loop(FILE *file_handle, const char *cup_name) ...@@ -782,7 +788,9 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
} }
/* switched off due to statistics (statistic module needs all irgs) */ /* switched off due to statistics (statistic module needs all irgs) */
#ifdef FIRM_STATISTICS
if (! stat_is_active()) if (! stat_is_active())
#endif
free_ir_graph(irg); free_ir_graph(irg);
if(be_stat_ev_is_active()) { if(be_stat_ev_is_active()) {
...@@ -823,7 +831,9 @@ void be_main(FILE *file_handle, const char *cup_name) ...@@ -823,7 +831,9 @@ void be_main(FILE *file_handle, const char *cup_name)
lc_timer_reset_and_start(t); lc_timer_reset_and_start(t);
} }
#ifdef FIRM_STATISTICS
be_init_stat_file(be_options.stat_file_name, cup_name); be_init_stat_file(be_options.stat_file_name, cup_name);
#endif
#endif /* WITH_LIBCORE */ #endif /* WITH_LIBCORE */
/* never build code for pseudo irgs */ /* never build code for pseudo irgs */
...@@ -844,7 +854,9 @@ void be_main(FILE *file_handle, const char *cup_name) ...@@ -844,7 +854,9 @@ void be_main(FILE *file_handle, const char *cup_name)
} }
} }
#ifdef FIRM_STATISTICS
be_close_stat_file(); be_close_stat_file();
#endif
#endif /* WITH_LIBCORE */ #endif /* WITH_LIBCORE */
} }
......
...@@ -691,7 +691,6 @@ static void check_allocation(be_raext_env_t *raenv) { ...@@ -691,7 +691,6 @@ static void check_allocation(be_raext_env_t *raenv) {
/** /**
* Default values for options * Default values for options
*/ */
static set* (*ssa_destr)(ir_graph*,const arch_env_t*) = be_ssa_destr_simple;
static char callee[128] = "\"E:/user/kimohoff/public/register allocator\""; static char callee[128] = "\"E:/user/kimohoff/public/register allocator\"";
//static char callee[128] = "/ben/kimohoff/ipd-registerallocator/register_allocator"; //static char callee[128] = "/ben/kimohoff/ipd-registerallocator/register_allocator";
...@@ -794,6 +793,8 @@ static const lc_opt_enum_func_ptr_items_t ssa_destr_items[] = { ...@@ -794,6 +793,8 @@ static const lc_opt_enum_func_ptr_items_t ssa_destr_items[] = {
{ NULL, NULL } { NULL, NULL }
}; };
static set* (*ssa_destr)(ir_graph*,const arch_env_t*) = be_ssa_destr_simple;
static lc_opt_enum_func_ptr_var_t ssa_destr_var = { static lc_opt_enum_func_ptr_var_t ssa_destr_var = {
(int (**)(void)) &ssa_destr, ssa_destr_items (int (**)(void)) &ssa_destr, ssa_destr_items
}; };
......
...@@ -252,7 +252,7 @@ static void replace_tuple_by_repr_proj(mris_env_t *env, ir_node **in) ...@@ -252,7 +252,7 @@ static void replace_tuple_by_repr_proj(mris_env_t *env, ir_node **in)
static void lineage_formation(mris_env_t *env) static void lineage_formation(mris_env_t *env)
{ {
firm_dbg_module_t *dbg = env->dbg; DEBUG_ONLY(firm_dbg_module_t *dbg = env->dbg);
nodeset *nodes = new_nodeset(128); nodeset *nodes = new_nodeset(128);
const ir_edge_t *edge; const ir_edge_t *edge;
......
...@@ -297,12 +297,14 @@ static ir_node **build_sorted_array_from_list(plist_t *irn_list, struct obstack ...@@ -297,12 +297,14 @@ static ir_node **build_sorted_array_from_list(plist_t *irn_list, struct obstack
* *
*****************************************************/ *****************************************************/
#ifdef DEBUG_libfirm
static void dump_nodeset(nodeset *ns, const char *prefix) { static void dump_nodeset(nodeset *ns, const char *prefix) {
ir_node *irn; ir_node *irn;
foreach_nodeset(ns, irn) { foreach_nodeset(ns, irn) {
ir_fprintf(stderr, "%s%+F\n", prefix, irn); ir_fprintf(stderr, "%s%+F\n", prefix, irn);
} }
} }
#endif
static void build_file_name(rss_t *rss, const char *suffix, size_t suf_len, char *buf, size_t len) { static void build_file_name(rss_t *rss, const char *suffix, size_t suf_len, char *buf, size_t len) {
const char *irg_name; const char *irg_name;
...@@ -854,6 +856,7 @@ static void build_kill_edges(rss_t *rss, pset *epk) { ...@@ -854,6 +856,7 @@ static void build_kill_edges(rss_t *rss, pset *epk) {
} }
} }
#ifdef DEBUG_libfirm
/* print the given cbc for debugging purpose */ /* print the given cbc for debugging purpose */
static void debug_print_cbc(firm_dbg_module_t *mod, cbc_t *cbc) { static void debug_print_cbc(firm_dbg_module_t *mod, cbc_t *cbc) {
ir_node *n; ir_node *n;
...@@ -872,6 +875,7 @@ static void debug_print_cbc(firm_dbg_module_t *mod, cbc_t *cbc) { ...@@ -872,6 +875,7 @@ static void debug_print_cbc(firm_dbg_module_t *mod, cbc_t *cbc) {
DBG((mod, LEVEL_3, "\t\t\t%+F -> %+F\n", ke->src, ke->tgt)); DBG((mod, LEVEL_3, "\t\t\t%+F -> %+F\n", ke->src, ke->tgt));
} }
} }
#endif
/** /**
* Construct the bipartite decomposition. * Construct the bipartite decomposition.
...@@ -1670,8 +1674,8 @@ static serialization_t *compute_best_admissible_serialization(rss_t *rss, nodese ...@@ -1670,8 +1674,8 @@ static serialization_t *compute_best_admissible_serialization(rss_t *rss, nodese
ir_node *irn; ir_node *irn;
rss_edge_t min_benefit_edge; rss_edge_t min_benefit_edge;
rss_edge_t min_omega20_edge; rss_edge_t min_omega20_edge;
rss_irn_t *ser_u_omega1, *ser_v_omega1; rss_irn_t *ser_u_omega1 = NULL, *ser_v_omega1 = NULL;
rss_irn_t *ser_u_omega20, *ser_v_omega20; rss_irn_t *ser_u_omega20 = NULL, *ser_v_omega20 = NULL;
DBG((rss->dbg, LEVEL_1, "\tcomputing admissible serializations:\n")); DBG((rss->dbg, LEVEL_1, "\tcomputing admissible serializations:\n"));
......
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
#include "config.h" #include "config.h"
#endif #endif
#ifdef FIRM_STATISTICS
#include <time.h> #include <time.h>
#include "irnode_t.h" #include "irnode_t.h"
...@@ -26,6 +24,8 @@ ...@@ -26,6 +24,8 @@
#include "besched.h" #include "besched.h"
#include "benode_t.h" #include "benode_t.h"
#ifdef FIRM_STATISTICS
typedef struct _be_stat_irg_t { typedef struct _be_stat_irg_t {
ir_graph *irg; /**< the irg, the statistic is about */ ir_graph *irg; /**< the irg, the statistic is about */
pset *phases; /**< node statistics for each phase */ pset *phases; /**< node statistics for each phase */
...@@ -302,6 +302,7 @@ void be_stat_init_irg(const arch_env_t *arch_env, ir_graph *irg) { ...@@ -302,6 +302,7 @@ void be_stat_init_irg(const arch_env_t *arch_env, ir_graph *irg) {
} }
} }
} }
#endif
typedef struct _estimate_irg_costs_env_t { typedef struct _estimate_irg_costs_env_t {
const arch_env_t *arch_env; const arch_env_t *arch_env;
...@@ -334,6 +335,7 @@ double be_estimate_irg_costs(ir_graph *irg, const arch_env_t *arch_env, ir_exec_ ...@@ -334,6 +335,7 @@ double be_estimate_irg_costs(ir_graph *irg, const arch_env_t *arch_env, ir_exec_
return env.costs; return env.costs;
} }
#ifdef FIRM_STATISTICS
const char *be_stat_tags[STAT_TAG_LAST]; const char *be_stat_tags[STAT_TAG_LAST];
FILE *be_stat_file = NULL; FILE *be_stat_file = NULL;
......
...@@ -76,12 +76,6 @@ void be_do_stat_nodes(ir_graph *irg, const char *phase); ...@@ -76,12 +76,6 @@ void be_do_stat_nodes(ir_graph *irg, const char *phase);
*/ */
void be_stat_init_irg(const arch_env_t *arch_env, ir_graph *irg); void be_stat_init_irg(const arch_env_t *arch_env, ir_graph *irg);
/**
* Gives a cost estimate for the program (based on execution frequencies)
* and backend op_estimated_cost
*/
double be_estimate_irg_costs(ir_graph *irg, const arch_env_t *arch_env, ir_exec_freq *execfreqs);
void be_init_stat_file(const char *filename, const char *sourcefilename); void be_init_stat_file(const char *filename, const char *sourcefilename);
void be_close_stat_file(void); void be_close_stat_file(void);
...@@ -96,4 +90,10 @@ void be_close_stat_file(void); ...@@ -96,4 +90,10 @@ void be_close_stat_file(void);
#endif /* FIRM_STATISTICS */ #endif /* FIRM_STATISTICS */
/**
* Gives a cost estimate for the program (based on execution frequencies)
* and backend op_estimated_cost
*/
double be_estimate_irg_costs(ir_graph *irg, const arch_env_t *arch_env, ir_exec_freq *execfreqs);
#endif /* _BESTAT_H_ */ #endif /* _BESTAT_H_ */
...@@ -105,7 +105,7 @@ static const be_use_t *get_or_set_use_block(be_uses_t *env, ...@@ -105,7 +105,7 @@ static const be_use_t *get_or_set_use_block(be_uses_t *env,
static int be_is_phi_argument(const be_lv_t *lv, const ir_node *block, const ir_node *def) static int be_is_phi_argument(const be_lv_t *lv, const ir_node *block, const ir_node *def)
{ {
ir_node *node; ir_node *node;
ir_node *succ_block; ir_node *succ_block = NULL;
const ir_edge_t *edge; const ir_edge_t *edge;
int arity, i; int arity, i;
......
...@@ -3353,7 +3353,7 @@ static void transform_psi_cond(ir_node *cond, ir_mode *mode, ia32_code_gen_t *cg ...@@ -3353,7 +3353,7 @@ static void transform_psi_cond(ir_node *cond, ir_mode *mode, ia32_code_gen_t *cg
tenv.irg = irg; tenv.irg = irg;
tenv.irn = cmp; tenv.irn = cmp;
tenv.mode = mode; tenv.mode = mode;
tenv.mod = cg->mod; DEBUG_ONLY(tenv.mod = cg->mod;)
new_op = gen_binop(&tenv, cmp_a, cmp_b, set_func); new_op = gen_binop(&tenv, cmp_a, cmp_b, set_func);
set_ia32_pncode(get_Proj_pred(new_op), pnc); set_ia32_pncode(get_Proj_pred(new_op), pnc);
......
#!/bin/sh #!/bin/sh
EDG_BIN="eccp" EDG_BIN="eccp"
EDG_CFLAGS="${ADDCFLAGS} -O3 -c" EDG_CFLAGS="${ADDCFLAGS} -O3 -c -D__builtin_memcpy=memcpy -D__builtin_memset=memset -D__builtin_strlen=strlen -D__builtin_strcpy=strcpy -D__builtin_strcmp=strcmp -DNO_TRAMPOLINES"
GCC_CFLAGS="-O3 -g -fomit-frame-pointer" GCC_CFLAGS="-O3 -g -fomit-frame-pointer"