X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fana%2Firextbb2.c;h=700d2c3697761e912f3e7780b87ea6efd7adca01;hb=070134aa742484085c66db733a759aa3316dbf24;hp=310c2a79918353e3fa099131e034f9eadbb8010b;hpb=c79fe4adc914d8d867772053bedf449a4f85645d;p=libfirm diff --git a/ir/ana/irextbb2.c b/ir/ana/irextbb2.c index 310c2a799..700d2c369 100644 --- a/ir/ana/irextbb2.c +++ b/ir/ana/irextbb2.c @@ -39,8 +39,8 @@ #include "irprintf.h" #include "execfreq.h" -typedef struct _env { - struct obstack *obst; /**< the obstack where allocations took place */ +typedef struct env { + struct obstack *obst; /**< the obstack where allocations took place */ ir_extblk *head; /**< head of the list of all extended blocks */ ir_exec_freq *execfreqs; } env_t; @@ -122,7 +122,7 @@ static void pick_successor(ir_node *block, ir_extblk *extblk, env_t *env) ir_node *best_succ = NULL; double best_execfreq = -1; - /* + /* More than two successors means we have a jump table. we cannot include a jump target into the current extended basic block, so create a new one here. @@ -180,7 +180,7 @@ static void pick_successor(ir_node *block, ir_extblk *extblk, env_t *env) */ void compute_extbb_execfreqs(ir_graph *irg, ir_exec_freq *execfreqs) { - env_t env; + env_t env; ir_extblk *extbb, *next; ir_node *endblock; @@ -221,8 +221,8 @@ void compute_extbb_execfreqs(ir_graph *irg, ir_exec_freq *execfreqs) extbb->blks = NEW_ARR_D(ir_node *, env.obst, len); - for (block = extbb->link, i = 0; i < len; ++i) { - ir_node *nblock = get_irn_link(block); + for (block = (ir_node*) extbb->link, i = 0; i < len; ++i) { + ir_node *nblock = (ir_node*) get_irn_link(block); /* ensure that the leader is the first one */ extbb->blks[len - 1 - i] = block; @@ -243,5 +243,5 @@ void compute_extbb_execfreqs(ir_graph *irg, ir_exec_freq *execfreqs) extbb->visited = 0; } - irg->extblk_state = extblk_valid; + set_irg_state(irg, IR_GRAPH_STATE_VALID_EXTENDED_BLOCKS); }