summaryrefslogtreecommitdiffhomepage
path: root/ir/be/bestat.c
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2010-11-04 13:15:30 +0100
committerMatthias Braun <matze@braunis.de>2010-11-04 13:15:30 +0100
commitce6161a7e42a48f7422b7babcc64d8ace18e2687 (patch)
tree2fa5272f9220c4e08a5309057f44646fb9f882a7 /ir/be/bestat.c
parentfd269bc519af571ad9a96afd65bcd504f3034f8b (diff)
make firm compilable with a c++ compiler
[r28127]
Diffstat (limited to 'ir/be/bestat.c')
-rw-r--r--ir/be/bestat.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ir/be/bestat.c b/ir/be/bestat.c
index df0ac3c..be09837 100644
--- a/ir/be/bestat.c
+++ b/ir/be/bestat.c
@@ -94,7 +94,7 @@ static void check_reg_pressure_class(pressure_walker_env_t *env,
static void stat_reg_pressure_block(ir_node *block, void *data)
{
- pressure_walker_env_t *env = data;
+ pressure_walker_env_t *env = (pressure_walker_env_t*)data;
check_reg_pressure_class(env, block, env->cls);
}
@@ -130,7 +130,7 @@ typedef struct estimate_irg_costs_env_t {
static void estimate_block_costs(ir_node *block, void *data)
{
- estimate_irg_costs_env_t *env = data;
+ estimate_irg_costs_env_t *env = (estimate_irg_costs_env_t*)data;
ir_node *node;
double costs = 0.0;
@@ -157,7 +157,7 @@ double be_estimate_irg_costs(ir_graph *irg, ir_exec_freq *execfreqs)
static void node_stat_walker(ir_node *irn, void *data)
{
- be_node_stats_t *const stats = data;
+ be_node_stats_t *const stats = (be_node_stats_t*)data;
/* if the node is a normal phi */
if (is_Phi(irn)) {
@@ -217,10 +217,10 @@ static const char *get_stat_name(enum be_stat_tag_t tag)
void be_emit_node_stats(be_node_stats_t *stats, const char *prefix)
{
- static char buf[256];
- int i;
+ static char buf[256];
+ be_stat_tag_t i;
- for (i = 0; i < BE_STAT_COUNT; ++i) {
+ for (i = BE_STAT_FIRST; i < BE_STAT_COUNT; ++i) {
snprintf(buf, sizeof(buf), "%s%s", prefix, get_stat_name(i));
stat_ev_dbl(buf, (*stats)[i]);
}
@@ -230,7 +230,7 @@ void be_emit_node_stats(be_node_stats_t *stats, const char *prefix)
static void insn_count_walker(ir_node *irn, void *data)
{
- unsigned long *cnt = data;
+ unsigned long *cnt = (unsigned long*)data;
switch (get_irn_opcode(irn)) {
case iro_Proj:
@@ -252,7 +252,7 @@ unsigned long be_count_insns(ir_graph *irg)
static void block_count_walker(ir_node *node, void *data)
{
- unsigned long *cnt = data;
+ unsigned long *cnt = (unsigned long*)data;
if (node == get_irg_end_block(current_ir_graph))
return;
(*cnt)++;