Commit 33249fb0 authored by Michael Beck's avatar Michael Beck
Browse files

- C99 features removed

- fixed warning

[r26528]
parent 89c08c53
......@@ -1272,12 +1272,11 @@ void be_init_copyheur2(void)
lc_opt_entry_t *chordal_grp = lc_opt_get_grp(ra_grp, "chordal");
lc_opt_entry_t *co2_grp = lc_opt_get_grp(chordal_grp, "co2");
lc_opt_add_table(co2_grp, options);
static co_algo_info copyheur = {
co_solve_heuristic_new, 0
};
lc_opt_add_table(co2_grp, options);
be_register_copyopt("heur2", &copyheur);
}
......
......@@ -1481,12 +1481,11 @@ void be_init_copyheur4(void) {
lc_opt_entry_t *co_grp = lc_opt_get_grp(chordal_grp, "co");
lc_opt_entry_t *heur4_grp = lc_opt_get_grp(co_grp, "heur4");
lc_opt_add_table(heur4_grp, options);
static co_algo_info copyheur = {
co_solve_heuristic_mst, 0
};
lc_opt_add_table(heur4_grp, options);
be_register_copyopt("heur4", &copyheur);
FIRM_DBG_REGISTER(dbg, "firm.be.co.heur4");
......
......@@ -258,7 +258,7 @@ static void give_penalties_for_limits(const ir_nodeset_t *live_nodes,
n_allowed = rbitset_popcnt(limited, n_regs);
if (n_allowed > 1) {
/* only create a very weak penalty if multiple regs are allowed */
penalty = (penalty * 0.8) / n_allowed;
penalty = (penalty * 0.8f) / n_allowed;
}
foreach_ir_nodeset(live_nodes, neighbor, iter) {
allocation_info_t *neighbor_info;
......@@ -868,16 +868,20 @@ static void assign_reg(const ir_node *block, ir_node *node,
}
for (i = 0; i < n_regs; ++i) {
float pref, delta;
ir_node *before;
bool res;
r = reg_prefs[i].num;
if (!rbitset_is_set(allowed_regs, r))
continue;
if (assignments[r] == NULL)
break;
float pref = reg_prefs[i].pref;
float delta = i+1 < n_regs ? pref - reg_prefs[i+1].pref : 0;
ir_node *before = skip_Proj(node);
bool res = try_optimistic_split(assignments[r], before,
pref, delta, forbidden_regs, 0);
pref = reg_prefs[i].pref;
delta = i+1 < n_regs ? pref - reg_prefs[i+1].pref : 0;
before = skip_Proj(node);
res = try_optimistic_split(assignments[r], before,
pref, delta, forbidden_regs, 0);
if (res)
break;
}
......
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