* @brief Block-scheduling strategies.
* @author Matthias Braun, Christoph Mallon
* @date 27.09.2006
* @brief Block-scheduling strategies.
* @author Matthias Braun, Christoph Mallon
* @date 27.09.2006
*
* The goals of the greedy (and ILP) algorithm here works by assuming that
* we want to change as many jumps to fallthroughs as possible (executed jumps
*
* The goals of the greedy (and ILP) algorithm here works by assuming that
* we want to change as many jumps to fallthroughs as possible (executed jumps
- LC_OPT_ENT_ENUM_INT ("algo", "the block scheduling algorithm", &algo_var),
+ LC_OPT_ENT_ENUM_INT ("blockscheduler", "the block scheduling algorithm", &algo_var),
return QSORT_CMP(e2->execfreq, e1->execfreq);
}
static int cmp_edges_outedge_penalty(const void *d1, const void *d2)
{
return QSORT_CMP(e2->execfreq, e1->execfreq);
}
static int cmp_edges_outedge_penalty(const void *d1, const void *d2)
{
/* reverse sorting as penalties are negative */
return QSORT_CMP(e1->outedge_penalty_freq, e2->outedge_penalty_freq);
}
/* reverse sorting as penalties are negative */
return QSORT_CMP(e1->outedge_penalty_freq, e2->outedge_penalty_freq);
}
/* is 1 of the blocks already attached to another block? */
if (pred_entry->next != NULL || entry->prev != NULL)
/* is 1 of the blocks already attached to another block? */
if (pred_entry->next != NULL || entry->prev != NULL)
// collect edge execution frequencies
irg_block_walk_graph(irg, collect_egde_frequency, NULL, &env);
// collect edge execution frequencies
irg_block_walk_graph(irg, collect_egde_frequency, NULL, &env);
typedef struct ilp_edge_t {
ir_node *block; /**< source block */
int pos; /**< number of cfg predecessor (target) */
typedef struct ilp_edge_t {
ir_node *block; /**< source block */
int pos; /**< number of cfg predecessor (target) */
- entry->out_cst = lpp_add_cst_uniq(env->lpp, name, lpp_greater, out_count - 1);
+ entry->out_cst = lpp_add_cst_uniq(env->lpp, name, lpp_greater_equal, out_count - 1);
int i;
snprintf(name, sizeof(name), "block_in_constr_%ld", get_irn_node_nr(block));
int i;
snprintf(name, sizeof(name), "block_in_constr_%ld", get_irn_node_nr(block));
- cst = lpp_add_cst_uniq(env->lpp, name, lpp_greater, arity - 1);
+ cst = lpp_add_cst_uniq(env->lpp, name, lpp_greater_equal, arity - 1);
lpp_set_factor_fast(env->lpp, entry->out_cst, edge->ilpvar, 1.0);
}
lpp_set_factor_fast(env->lpp, entry->out_cst, edge->ilpvar, 1.0);
}
lpp_set_time_limit(env.lpp, 20);
lpp_set_log(env.lpp, stdout);
lpp_set_time_limit(env.lpp, 20);
lpp_set_log(env.lpp, stdout);
void be_init_blocksched(void)
{
lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
void be_init_blocksched(void)
{
lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");