Commit 8ccfe04c authored by Matthias Braun's avatar Matthias Braun
Browse files

fix more cparser warnings, cleanup some libcore code

parent 89ac4d2c
......@@ -194,7 +194,9 @@
* @remark This macro may change arr, so update all references!
*/
#define ARR_EXTO(type, arr, n) \
((n) >= ARR_LEN((arr)) ? ARR_RESIZE(type, (arr), (n)+1) : (arr))
do { \
if ((n) >= ARR_LEN(arr)) { ARR_RESIZE(type, arr, (n)+1); } \
} while(0)
/**
* Append one element to a flexible array.
......
......@@ -242,49 +242,49 @@ FIRM_API hook_entry_t *hooks[hook_last];
#define hook_exec(what, args) do { \
hook_entry_t *_p; \
for (_p = hooks[what]; _p; _p = _p->next){ \
void *ctx = _p->context; \
void *hook_ctx_ = _p->context; \
_p->hook._##what args; \
} \
} while (0)
#define hook_new_ir_op(op) hook_exec(hook_new_ir_op, (ctx, op))
#define hook_free_ir_op(op) hook_exec(hook_free_ir_op, (ctx, op))
#define hook_new_node(graph, node) hook_exec(hook_new_node, (ctx, graph, node))
#define hook_new_ir_op(op) hook_exec(hook_new_ir_op, (hook_ctx_, op))
#define hook_free_ir_op(op) hook_exec(hook_free_ir_op, (hook_ctx_, op))
#define hook_new_node(graph, node) hook_exec(hook_new_node, (hook_ctx_, graph, node))
#define hook_set_irn_n(src, pos, tgt, old_tgt) \
hook_exec(hook_set_irn_n, (ctx, src, pos, tgt, old_tgt))
#define hook_replace(old, nw) hook_exec(hook_replace, (ctx, old, nw))
#define hook_turn_into_id(node) hook_exec(hook_turn_into_id, (ctx, node))
#define hook_normalize(node) hook_exec(hook_normalize, (ctx, node))
#define hook_new_graph(irg, ent) hook_exec(hook_new_graph, (ctx, irg, ent))
#define hook_free_graph(irg) hook_exec(hook_free_graph, (ctx, irg))
#define hook_irg_walk(irg, pre, post) hook_exec(hook_irg_walk, (ctx, irg, pre, post))
hook_exec(hook_set_irn_n, (hook_ctx_, src, pos, tgt, old_tgt))
#define hook_replace(old, nw) hook_exec(hook_replace, (hook_ctx_, old, nw))
#define hook_turn_into_id(node) hook_exec(hook_turn_into_id, (hook_ctx_, node))
#define hook_normalize(node) hook_exec(hook_normalize, (hook_ctx_, node))
#define hook_new_graph(irg, ent) hook_exec(hook_new_graph, (hook_ctx_, irg, ent))
#define hook_free_graph(irg) hook_exec(hook_free_graph, (hook_ctx_, irg))
#define hook_irg_walk(irg, pre, post) hook_exec(hook_irg_walk, (hook_ctx_, irg, pre, post))
#define hook_irg_walk_blkwise(irg, pre, post) \
hook_exec(hook_irg_walk_blkwise, (ctx, irg, pre, post))
hook_exec(hook_irg_walk_blkwise, (hook_ctx_, irg, pre, post))
#define hook_irg_block_walk(irg, node, pre, post) \
hook_exec(hook_irg_block_walk, (ctx, irg, node, pre, post))
hook_exec(hook_irg_block_walk, (hook_ctx_, irg, node, pre, post))
#define hook_merge_nodes(new_node_array, new_num_entries, old_node_array, old_num_entries, opt) \
hook_exec(hook_merge_nodes, (ctx, new_node_array, new_num_entries, old_node_array, old_num_entries, opt))
#define hook_reassociate(start) hook_exec(hook_reassociate, (ctx, start))
#define hook_lower(node) hook_exec(hook_lower, (ctx, node))
#define hook_inline(call, irg) hook_exec(hook_inline, (ctx, call, irg))
#define hook_tail_rec(irg, n_calls) hook_exec(hook_tail_rec, (ctx, irg, n_calls))
hook_exec(hook_merge_nodes, (hook_ctx_, new_node_array, new_num_entries, old_node_array, old_num_entries, opt))
#define hook_reassociate(start) hook_exec(hook_reassociate, (hook_ctx_, start))
#define hook_lower(node) hook_exec(hook_lower, (hook_ctx_, node))
#define hook_inline(call, irg) hook_exec(hook_inline, (hook_ctx_, call, irg))
#define hook_tail_rec(irg, n_calls) hook_exec(hook_tail_rec, (hook_ctx_, irg, n_calls))
#define hook_strength_red(irg, node) \
hook_exec(hook_strength_red, (ctx, irg, node))
#define hook_dead_node_elim(irg, start) hook_exec(hook_dead_node_elim, (ctx, irg, start))
hook_exec(hook_strength_red, (hook_ctx_, irg, node))
#define hook_dead_node_elim(irg, start) hook_exec(hook_dead_node_elim, (hook_ctx_, irg, start))
#define hook_dead_node_elim_subst(irg, old, nw) \
hook_exec(hook_dead_node_elim_subst, (ctx, irg, old, nw))
hook_exec(hook_dead_node_elim_subst, (hook_ctx_, irg, old, nw))
#define hook_if_conversion(irg, phi, pos, mux, reason) \
hook_exec(hook_if_conversion, (ctx, irg, phi, pos, mux, reason))
hook_exec(hook_if_conversion, (hook_ctx_, irg, phi, pos, mux, reason))
#define hook_func_call(irg, call) \
hook_exec(hook_func_call, (ctx, irg, call))
hook_exec(hook_func_call, (hook_ctx_, irg, call))
#define hook_arch_dep_replace_mul_with_shifts(irn) \
hook_exec(hook_arch_dep_replace_mul_with_shifts, (ctx, irn))
hook_exec(hook_arch_dep_replace_mul_with_shifts, (hook_ctx_, irn))
#define hook_arch_dep_replace_division_by_const(irn) \
hook_exec(hook_arch_dep_replace_division_by_const, (ctx, irn))
#define hook_new_mode(tmpl, mode) hook_exec(hook_new_mode, (ctx, tmpl, mode))
#define hook_new_entity(ent) hook_exec(hook_new_entity, (ctx, ent))
#define hook_new_type(tp) hook_exec(hook_new_type, (ctx, tp))
#define hook_node_info(F, node) hook_exec(hook_node_info, (ctx, F, node))
hook_exec(hook_arch_dep_replace_division_by_const, (hook_ctx_, irn))
#define hook_new_mode(tmpl, mode) hook_exec(hook_new_mode, (hook_ctx_, tmpl, mode))
#define hook_new_entity(ent) hook_exec(hook_new_entity, (hook_ctx_, ent))
#define hook_new_type(tp) hook_exec(hook_new_type, (hook_ctx_, tp))
#define hook_node_info(F, node) hook_exec(hook_node_info, (hook_ctx_, F, node))
#include "end.h"
......
......@@ -91,11 +91,12 @@ static ptr_access_kind analyze_arg(ir_node *arg, ptr_access_kind bits)
}
} else if (is_Sel(ptr) && get_irp_callee_info_state() == irg_callee_info_consistent) {
/* is be a polymorphic call but callee information is available */
int i, n_params = get_Call_n_params(succ);
int n_params = get_Call_n_params(succ);
int c;
/* simply look into ALL possible callees */
for (i = get_Call_n_callees(succ) - 1; i >= 0; --i) {
meth_ent = get_Call_callee(succ, i);
for (c = get_Call_n_callees(succ) - 1; c >= 0; --c) {
meth_ent = get_Call_callee(succ, c);
/* unknown_entity is used to signal that we don't know what is called */
if (meth_ent == unknown_entity) {
......
......@@ -350,8 +350,6 @@ static void free_mark_proj(ir_node * node, long n, eset * set)
*/
static void free_mark(ir_node *node, eset * set)
{
size_t i, n;
if (get_irn_link(node) == MARK)
return; /* already visited */
......@@ -361,6 +359,7 @@ static void free_mark(ir_node *node, eset * set)
case iro_Sel: {
ir_entity *ent = get_Sel_entity(node);
if (is_method_entity(ent)) {
size_t i, n;
for (i = 0, n = get_Sel_n_methods(node); i < n; ++i) {
eset_insert(set, get_Sel_method(node, i));
}
......@@ -399,7 +398,6 @@ static void free_mark(ir_node *node, eset * set)
static void free_ana_walker(ir_node *node, void *env)
{
eset *set = (eset*) env;
int i;
if (get_irn_link(node) == MARK) {
/* already visited */
......@@ -430,7 +428,8 @@ static void free_ana_walker(ir_node *node, void *env)
}
break;
}
default:
default: {
int i;
/* other nodes: Alle anderen Knoten nehmen wir als Verr�ter an, bis
* jemand das Gegenteil implementiert. */
set_irn_link(node, MARK);
......@@ -442,6 +441,7 @@ static void free_ana_walker(ir_node *node, void *env)
}
break;
}
}
}
/**
......@@ -518,10 +518,10 @@ static void add_method_address(ir_entity *ent, eset *set)
/* let's check if it's the address of a function */
if (is_Global(irn)) {
ir_entity *ent = get_Global_entity(irn);
ir_entity *ent2 = get_Global_entity(irn);
if (is_Method_type(get_entity_type(ent)))
eset_insert(set, ent);
if (is_Method_type(get_entity_type(ent2)))
eset_insert(set, ent2);
}
}
}
......
......@@ -274,7 +274,7 @@ void dfs_dump(const dfs_t *dfs, FILE *file)
}
for (i = 0; i < n; ++i) {
dfs_node_t *node = nodes[i];
node = nodes[i];
ir_fprintf(file, "\tn%d [label=\"%d\"]\n", node->pre_num, get_Block_dom_tree_pre_num((ir_node*) node->node));
#if 0
ir_fprintf(file, "\tn%d [shape=box,label=\"%+F\\l%d %d/%d %d\"];\n",
......
......@@ -295,7 +295,6 @@ ir_exec_freq *compute_execfreq(ir_graph *irg, double loop_weight)
for (idx = dfs_get_n_nodes(dfs) - 1; idx >= 0; --idx) {
ir_node *bb = (ir_node *) dfs_get_post_num_node(dfs, size - idx - 1);
freq_t *freq;
int i;
freq = set_insert_freq(freqs, bb);
......@@ -354,7 +353,7 @@ ir_exec_freq *compute_execfreq(ir_graph *irg, double loop_weight)
ef->max = 0.0;
set_foreach(freqs, freq_t*, freq) {
int idx = freq->idx;
idx = freq->idx;
/* take abs because it sometimes can be -0 in case of endless loops */
freq->freq = fabs(x[idx]) * norm;
......
......@@ -308,14 +308,14 @@ static void handle_if(ir_node *block, ir_node *cmp, ir_relation rel, env_t *env)
* left == Const and we found a movable user of left in a
* dominator of the Cond block
*/
const ir_edge_t *edge, *next;
for (edge = get_irn_out_edge_first(user); edge; edge = next) {
ir_node *usr_of_usr = get_edge_src_irn(edge);
int npos = get_edge_src_pos(edge);
ir_node *blk = get_effective_use_block(usr_of_usr, npos);
next = get_irn_out_edge_next(user, edge);
if (block_dominates(block, blk)) {
const ir_edge_t *user_edge;
const ir_edge_t *user_next;
foreach_out_edge_safe(user, user_edge, user_next) {
ir_node *usr_of_usr = get_edge_src_irn(user_edge);
int npos = get_edge_src_pos(user_edge);
ir_node *user_blk = get_effective_use_block(usr_of_usr, npos);
if (block_dominates(block, user_blk)) {
/*
* The user of the user is dominated by our true/false
* block. So, create a copy of user WITH the constant
......
......@@ -896,14 +896,14 @@ static ir_entity_usage determine_entity_usage(const ir_node *irn, ir_entity *ent
res |= determine_entity_usage(succ, entity);
break;
case iro_Sel: {
ir_entity *entity = get_Sel_entity(succ);
ir_entity *sel_entity = get_Sel_entity(succ);
/* this analysis can't handle unions correctly */
if (is_Union_type(get_entity_owner(entity))) {
if (is_Union_type(get_entity_owner(sel_entity))) {
res |= ir_usage_unknown;
break;
}
/* Check the successor of irn. */
res |= determine_entity_usage(succ, entity);
res |= determine_entity_usage(succ, sel_entity);
break;
}
......@@ -1140,8 +1140,8 @@ static void check_initializer(ir_entity *ent)
/* let's check if it's an address */
if (is_Global(irn)) {
ir_entity *ent = get_Global_entity(irn);
set_entity_usage(ent, ir_usage_unknown);
ir_entity *symconst_ent = get_Global_entity(irn);
set_entity_usage(symconst_ent, ir_usage_unknown);
}
}
}
......
......@@ -431,7 +431,6 @@ static ir_region *new_SwitchCase(struct obstack *obst, ir_region_kind type, ir_r
reg->succ[0] = exit;
DEBUG_ONLY({
size_t i;
DB((dbg, LEVEL_2, " Created %s(%u)\n", reg->type == ir_rk_Switch ? "Switch" : "Case", reg->nr));
for (i = 1; i < ARR_LEN(reg->parts); ++i) {
DB((dbg, LEVEL_2, " Case(%lu)\n", reg->parts[i].region->nr));
......@@ -841,7 +840,7 @@ static ir_region *acyclic_region_type(struct obstack *obst, ir_region *node)
/* check for Switch, case */
if (k > 0) {
ir_region *rexit = NULL;
size_t i, p = 0;
size_t i, pos = 0;
nset = NULL; nset_len = 0;
for (i = k; i > 0;) {
n = get_region_succ(node, i--);
......@@ -849,12 +848,12 @@ static ir_region *acyclic_region_type(struct obstack *obst, ir_region *node)
if (get_region_n_succs(n) != 1) {
/* must be the exit */
rexit = n;
++p;
if (p > 1)
++pos;
if (pos > 1)
break;
}
}
if (p <= 1) {
if (pos <= 1) {
ir_region_kind kind = ir_rk_Case;
ir_region *pos_exit_1 = NULL;
ir_region *pos_exit_2 = NULL;
......
......@@ -453,7 +453,7 @@ static void amd64_get_call_abi(const void *self, ir_type *method_type,
/* FIXME: No floating point yet */
/* be_abi_call_res_reg(abi, 0,
mode_is_float(mode) ? &amd64_fp_regs[REG_F0] : &amd64_registers[REG_R0], ABI_CONTEXT_BOTH) */;
mode_is_float(mode) ? &amd64_fp_regs[REG_F0] : &amd64_registers[REG_R0], ABI_CONTEXT_BOTH); */
be_abi_call_res_reg(abi, 0,
&amd64_registers[REG_RAX], ABI_CONTEXT_BOTH);
......
......@@ -39,11 +39,30 @@ static const unsigned ignore_regs[] = {
REG_FL,
};
/* determine how function parameters and return values are passed. */
static const arch_register_t* const param_regs[] = {
&arm_registers[REG_R0],
&arm_registers[REG_R1],
&arm_registers[REG_R2],
&arm_registers[REG_R3]
};
static const arch_register_t* const result_regs[] = {
&arm_registers[REG_R0],
&arm_registers[REG_R1],
&arm_registers[REG_R2],
&arm_registers[REG_R3]
};
static const arch_register_t* const float_result_regs[] = {
&arm_registers[REG_F0],
&arm_registers[REG_F1]
};
calling_convention_t *arm_decide_calling_convention(const ir_graph *irg,
ir_type *function_type)
{
int stack_offset = 0;
unsigned stack_offset = 0;
unsigned n_param_regs_used = 0;
reg_or_stackslot_t *params;
reg_or_stackslot_t *results;
int n_param_regs
......@@ -90,15 +109,16 @@ calling_convention_t *arm_decide_calling_convention(const ir_graph *irg,
const arch_register_t *reg = param_regs[regnum++];
param->reg1 = reg;
} else {
ir_mode *mode = param_regs[0]->reg_class->mode;
ir_type *type = get_type_for_mode(mode);
param->type = type;
param->offset = stack_offset;
assert(get_mode_size_bits(mode) == 32);
ir_mode *pmode = param_regs[0]->reg_class->mode;
ir_type *type = get_type_for_mode(pmode);
param->type = type;
param->offset = stack_offset;
assert(get_mode_size_bits(pmode) == 32);
stack_offset += 4;
}
}
}
n_param_regs_used = regnum;
n_results = get_method_n_ress(function_type);
regnum = 0;
......@@ -133,6 +153,7 @@ calling_convention_t *arm_decide_calling_convention(const ir_graph *irg,
cconv = XMALLOCZ(calling_convention_t);
cconv->parameters = params;
cconv->param_stack_size = stack_offset;
cconv->n_reg_params = n_param_regs_used;
cconv->results = results;
/* setup allocatable registers */
......
......@@ -30,54 +30,6 @@
#include "../be_types.h"
#include "gen_arm_regalloc_if.h"
static const arch_register_t *const callee_saves[] = {
&arm_registers[REG_R4],
&arm_registers[REG_R5],
&arm_registers[REG_R6],
&arm_registers[REG_R7],
&arm_registers[REG_R8],
&arm_registers[REG_R9],
&arm_registers[REG_R10],
&arm_registers[REG_R11],
&arm_registers[REG_LR],
};
static const arch_register_t *const caller_saves[] = {
&arm_registers[REG_R0],
&arm_registers[REG_R1],
&arm_registers[REG_R2],
&arm_registers[REG_R3],
&arm_registers[REG_LR],
&arm_registers[REG_F0],
&arm_registers[REG_F1],
&arm_registers[REG_F2],
&arm_registers[REG_F3],
&arm_registers[REG_F4],
&arm_registers[REG_F5],
&arm_registers[REG_F6],
&arm_registers[REG_F7],
};
static const arch_register_t* const param_regs[] = {
&arm_registers[REG_R0],
&arm_registers[REG_R1],
&arm_registers[REG_R2],
&arm_registers[REG_R3]
};
static const arch_register_t* const result_regs[] = {
&arm_registers[REG_R0],
&arm_registers[REG_R1],
&arm_registers[REG_R2],
&arm_registers[REG_R3]
};
static const arch_register_t* const float_result_regs[] = {
&arm_registers[REG_F0],
&arm_registers[REG_F1]
};
/** information about a single parameter or result */
typedef struct reg_or_stackslot_t
{
......@@ -85,7 +37,7 @@ typedef struct reg_or_stackslot_t
const arch_register_t *reg1; /**< if != NULL, the second register used. */
ir_type *type; /**< indicates that an entity of the specific
type is needed */
int offset; /**< if transmitted via stack, the offset for this parameter. */
unsigned offset; /**< if transmitted via stack, the offset for this parameter. */
ir_entity *entity; /**< entity in frame type */
} reg_or_stackslot_t;
......@@ -93,7 +45,8 @@ typedef struct reg_or_stackslot_t
typedef struct calling_convention_t
{
reg_or_stackslot_t *parameters; /**< parameter info. */
int param_stack_size; /**< needed stack size for parameters */
unsigned param_stack_size; /**< needed stack size for parameters */
unsigned n_reg_params;
reg_or_stackslot_t *results; /**< result info. */
} calling_convention_t;
......
......@@ -1130,16 +1130,17 @@ void arm_gen_routine(ir_graph *irg)
be_emit_write_line();
} else {
ir_tarval *tv = entry->u.tv;
int i, size = get_mode_size_bytes(get_tarval_mode(tv));
unsigned v;
int vi;
int size = get_mode_size_bytes(get_tarval_mode(tv));
/* beware: ARM fpa uses big endian format */
for (i = ((size + 3) & ~3) - 4; i >= 0; i -= 4) {
for (vi = ((size + 3) & ~3) - 4; vi >= 0; vi -= 4) {
/* get 32 bits */
v = get_tarval_sub_bits(tv, i+3);
v = (v << 8) | get_tarval_sub_bits(tv, i+2);
v = (v << 8) | get_tarval_sub_bits(tv, i+1);
v = (v << 8) | get_tarval_sub_bits(tv, i+0);
unsigned v;
v = get_tarval_sub_bits(tv, vi+3);
v = (v << 8) | get_tarval_sub_bits(tv, vi+2);
v = (v << 8) | get_tarval_sub_bits(tv, vi+1);
v = (v << 8) | get_tarval_sub_bits(tv, vi+0);
be_emit_irprintf("\t.word\t%u\n", v);
be_emit_write_line();
}
......
......@@ -120,11 +120,11 @@ static void peephole_be_IncSP(ir_node *node)
first = node;
block = get_nodes_block(node);
for (cnt = 1; cnt < v.ops; ++cnt) {
int value = sign * arm_ror(v.values[cnt], v.rors[cnt]);
ir_node *next = be_new_IncSP(&arm_registers[REG_SP], block, node,
int value = sign * arm_ror(v.values[cnt], v.rors[cnt]);
ir_node *incsp = be_new_IncSP(&arm_registers[REG_SP], block, node,
value, 1);
sched_add_after(node, next);
node = next;
sched_add_after(node, incsp);
node = incsp;
}
/* reattach IncSP users */
......
......@@ -67,6 +67,35 @@ static arm_isa_t *isa;
static pmap *node_to_stack;
static const arch_register_t *const callee_saves[] = {
&arm_registers[REG_R4],
&arm_registers[REG_R5],
&arm_registers[REG_R6],
&arm_registers[REG_R7],
&arm_registers[REG_R8],
&arm_registers[REG_R9],
&arm_registers[REG_R10],
&arm_registers[REG_R11],
&arm_registers[REG_LR],
};
static const arch_register_t *const caller_saves[] = {
&arm_registers[REG_R0],
&arm_registers[REG_R1],
&arm_registers[REG_R2],
&arm_registers[REG_R3],
&arm_registers[REG_LR],
&arm_registers[REG_F0],
&arm_registers[REG_F1],
&arm_registers[REG_F2],
&arm_registers[REG_F3],
&arm_registers[REG_F4],
&arm_registers[REG_F5],
&arm_registers[REG_F6],
&arm_registers[REG_F7],
};
static bool mode_needs_gp_reg(ir_mode *mode)
{
return mode_is_int(mode) || mode_is_reference(mode);
......@@ -395,7 +424,7 @@ static ir_node *gen_int_binop(ir_node *node, match_flags_t flags,
}
if (try_encode_as_immediate(op2, &imm)) {
ir_node *new_op1 = be_transform_node(op1);
new_op1 = be_transform_node(op1);
return factory->new_binop_imm(dbgi, block, new_op1, imm.imm_8, imm.rot);
}
new_op2 = be_transform_node(op2);
......@@ -1635,9 +1664,9 @@ static ir_node *gen_Unknown(ir_node *node)
/* just produce a 0 */
ir_mode *mode = get_irn_mode(node);
if (mode_is_float(mode)) {
ir_tarval *tv = get_mode_null(mode);
ir_node *node = new_bd_arm_fConst(dbgi, new_block, tv);
return node;
ir_tarval *tv = get_mode_null(mode);
ir_node *fconst = new_bd_arm_fConst(dbgi, new_block, tv);
return fconst;
} else if (mode_needs_gp_reg(mode)) {
return create_const_graph_value(dbgi, new_block, 0);
}
......@@ -1825,7 +1854,7 @@ static ir_node *gen_Call(ir_node *node)
ir_type *type = get_Call_type(node);
calling_convention_t *cconv = arm_decide_calling_convention(NULL, type);
size_t n_params = get_Call_n_params(node);
size_t n_param_regs = sizeof(param_regs)/sizeof(param_regs[0]);
size_t n_param_regs = cconv->n_reg_params;
/* max inputs: memory, callee, register arguments */
int max_inputs = 2 + n_param_regs;
ir_node **in = ALLOCAN(ir_node*, max_inputs);
......
......@@ -78,8 +78,8 @@ static ir_entity *arm_get_frame_entity(const ir_node *irn)
const arm_attr_t *attr = get_arm_attr_const(irn);
if (is_arm_FrameAddr(irn)) {
const arm_SymConst_attr_t *attr = get_arm_SymConst_attr_const(irn);
return attr->entity;
const arm_SymConst_attr_t *frame_attr = get_arm_SymConst_attr_const(irn);
return frame_attr->entity;
}
if (attr->is_load_store) {
const arm_load_store_attr_t *load_store_attr
......
......@@ -385,7 +385,7 @@ static void pick_block_successor(blocksched_entry_t *entry, blocksched_env_t *en
break;
}
succ_entry = succ_entry->prev;
};
}
if (irn_visited(succ_entry->block))
continue;
......
......@@ -151,7 +151,7 @@ static void ps_finish(plotter_t *_self)
fclose(self->f);
}
const plotter_if_t ps_plotter_vtab = {
static const plotter_if_t ps_plotter_vtab = {
ps_begin,
ps_setcolor,
get_color,
......
......@@ -105,10 +105,6 @@ static const lc_opt_enum_int_items_t lower_perm_items[] = {
{ NULL, 0 }
};
static const lc_opt_enum_int_items_t lower_perm_stat_items[] = {
{ NULL, 0 }
};
static const lc_opt_enum_int_items_t dump_items[] = {
{ "none", BE_CH_DUMP_NONE },
{ "spill", BE_CH_DUMP_SPILL },
......@@ -254,7 +250,9 @@ static void pre_spill(post_spill_env_t *pse, const arch_register_class_t *cls)
be_assure_liveness(irg);
be_liveness_assure_chk(be_get_irg_liveness(irg));
stat_ev_do(pse->pre_spill_cost = be_estimate_irg_costs(irg, exec_freq));
if (stat_ev_enabled) {
pse->pre_spill_cost = be_estimate_irg_costs(irg, exec_freq);
}
/* put all ignore registers into the ignore register set. */
be_put_allocatable_regs(irg, pse->cls, chordal_env->allocatable_regs);
......@@ -317,7 +315,7 @@ static void post_spill(post_spill_env_t *pse, int iteration)
chordal_env->ifg = be_create_ifg(chordal_env);
be_timer_pop(T_RA_IFG);
stat_ev_if {
if (stat_ev_enabled) {
be_ifg_stat_t stat;
be_node_stats_t node_stats;
......@@ -395,7 +393,7 @@ static void be_ra_chordal_main(ir_graph *irg)
be_timer_pop(T_RA_PROLOG);
stat_ev_if {
if (stat_ev_enabled) {
be_collect_node_stats(&last_node_stats, irg);
}
......@@ -412,7 +410,7 @@ static void be_ra_chordal_main(ir_graph *irg)
stat_ev_ctx_push_str("bechordal_cls", cls->name);
stat_ev_if {
if (stat_ev_enabled) {
be_do_stat_reg_pressure(irg, cls);
}
......@@ -428,7 +426,7 @@ static void be_ra_chordal_main(ir_graph *irg)
post_spill(&pse, 0);