* @brief Extended basis block support.
* @author Michael Beck
* @date 5.2005
- * @version $Id$
*/
#include "config.h"
static void pre_walk_calc_extbb(ir_node *block, void *ctx)
{
int n = get_Block_n_cfgpreds(block);
- env_t *env = ctx;
+ env_t *env = (env_t*) ctx;
if (n <= 0 || n > 1 || block == env->start_block) {
/*
static void post_walk_calc_extbb(ir_node *block, void *ctx)
{
ir_extblk *extbb = get_Block_extbb(block);
- env_t *env = ctx;
+ env_t *env = (env_t*) ctx;
ir_extblk *sentinel = &_sentinel;
if (! extbb) {
}
/* arg, the list is in wrong order, turn around and add to the extbb list */
for (curr = list; curr; curr = prev) {
- prev = get_irn_link(curr);
+ prev = (ir_node*) get_irn_link(curr);
set_irn_link(curr, extbb->link);
extbb->link = curr;
set_Block_extbb(curr, extbb);
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;
extbb->visited = 0;
}
- irg->extblk_state = extblk_valid;
+ set_irg_state(irg, IR_GRAPH_STATE_VALID_EXTENDED_BLOCKS);
}
/* free all extended block info. */
xfree(irg->extbb_obst);
irg->extbb_obst = NULL;
}
- irg->extblk_state = extblk_none;
+ clear_irg_state(irg, IR_GRAPH_STATE_VALID_EXTENDED_BLOCKS);
}
/* Return the extended block of a node. */
}
}
-/* walks only over extended Block nodes in the graph. Has it's own visited
+/* walks only over extended Block nodes in the graph. Has its own visited
flag, so that it can be interleaved with the other walker. */
void irg_extblock_walk(ir_extblk *blk, extbb_walk_func *pre, extbb_walk_func *post, void *env)
{