X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbeilpsched.c;h=bf508a3754ab8dd6ba75f1a784b0328167c4742d;hb=75e3b5fe17402ca27fc671dd404ff958664506b1;hp=7d9c6a58563fe300f93b89169d1d805f1bf782a8;hpb=a2dc796648be8a0e8c85d6488e5ab5a790c218a9;p=libfirm diff --git a/ir/be/beilpsched.c b/ir/be/beilpsched.c index 7d9c6a585..bf508a375 100644 --- a/ir/be/beilpsched.c +++ b/ir/be/beilpsched.c @@ -33,6 +33,8 @@ #include "config.h" #endif +#include "firm_config.h" + #ifdef WITH_ILP #include @@ -687,6 +689,7 @@ static void refine_asap_alap_times(ir_node *irn, void *walk_env) { static INLINE void check_for_keeps(waitq *keeps, ir_node *block, ir_node *irn) { const ir_edge_t *edge; + (void) block; foreach_out_edge(irn, edge) { ir_node *user = get_edge_src_irn(edge); @@ -1869,6 +1872,7 @@ static void create_ilp(ir_node *block, void *walk_env) { DBG((env->dbg, LEVEL_1, "Creating LPP with estimated numbers: %d vars, %d cst\n", estimated_n_var, estimated_n_cst)); + (void) estimated_n_var; /* set up the LPP object */ snprintf(name, sizeof(name), "ilp scheduling IRG %s", get_entity_ld_name(get_irg_entity(env->irg))); @@ -1901,7 +1905,7 @@ static void create_ilp(ir_node *block, void *walk_env) { DBG((env->dbg, LEVEL_1, "ILP to solve: %u variables, %u constraints\n", lpp->var_next, lpp->cst_next)); /* debug stuff, dump lpp when debugging is on */ - DEBUG_ONLY_NICE { + DEBUG_ONLY({ if (firm_dbg_get_mask(env->dbg) > 1) { char buf[1024]; FILE *f; @@ -1913,7 +1917,7 @@ static void create_ilp(ir_node *block, void *walk_env) { snprintf(buf, sizeof(buf), "lpp_block_%lu.mps", get_irn_node_nr(block)); lpp_dump(lpp, buf); } - } + }) /* set solve time limit */ lpp_set_time_limit(lpp, env->opts->time_limit); @@ -1941,20 +1945,20 @@ static void create_ilp(ir_node *block, void *walk_env) { /* check for valid solution */ if (! lpp_is_sol_valid(lpp)) { - char buf[1024]; - FILE *f; - - DEBUG_ONLY_NICE { - if (firm_dbg_get_mask(env->dbg) >= 2) { - snprintf(buf, sizeof(buf), "lpp_block_%lu.infeasible.txt", get_irn_node_nr(block)); - f = fopen(buf, "w"); - lpp_dump_plain(lpp, f); - fclose(f); - snprintf(buf, sizeof(buf), "lpp_block_%lu.infeasible.mps", get_irn_node_nr(block)); - lpp_dump(lpp, buf); - dump_ir_block_graph(env->irg, "-infeasible"); - } - } + DEBUG_ONLY({ + char buf[1024]; + FILE *f; + + if (firm_dbg_get_mask(env->dbg) >= 2) { + snprintf(buf, sizeof(buf), "lpp_block_%lu.infeasible.txt", get_irn_node_nr(block)); + f = fopen(buf, "w"); + lpp_dump_plain(lpp, f); + fclose(f); + snprintf(buf, sizeof(buf), "lpp_block_%lu.infeasible.mps", get_irn_node_nr(block)); + lpp_dump(lpp, buf); + dump_ir_block_graph(env->irg, "-infeasible"); + } + }) ir_fprintf(stderr, "ILP found no solution within time (%+F, %+F), falling back to heuristics.\n", block, env->irg); need_heur = 1; @@ -2014,7 +2018,7 @@ void be_ilp_sched(const be_irg_t *birg, be_options_t *be_opts) { FIRM_DBG_REGISTER(env.dbg, "firm.be.sched.ilp"); - stat_ev_ctx_push("phase", "ilpsched"); + stat_ev_ctx_push("ilpsched"); // firm_dbg_set_mask(env.dbg, 1); @@ -2071,7 +2075,7 @@ void be_ilp_sched(const be_irg_t *birg, be_options_t *be_opts) { /* notify backend */ be_ilp_sched_finish_irg_ilp_schedule(sel, birg->irg, env.irg_env); - stat_ev_ctx_pop(); + stat_ev_ctx_pop("ilpsched"); } /**