gen_docu: fix missing attributes, show generation time at the end
[libfirm] / ir / ana / irextbb.c
index 34fd81c..4dec489 100644 (file)
@@ -22,7 +22,6 @@
  * @brief    Extended basis block support.
  * @author   Michael Beck
  * @date     5.2005
- * @version  $Id$
  */
 #include "config.h"
 
@@ -93,7 +92,7 @@ static int get_block_n_succs(ir_node *block)
 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) {
                /*
@@ -149,7 +148,7 @@ static ir_extblk _sentinel = { k_ir_extblk, 0xFEA1DEAD, NULL, NULL };
 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) {
@@ -189,7 +188,7 @@ static void post_walk_calc_extbb(ir_node *block, void *ctx)
                }
                /* 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);
@@ -240,8 +239,8 @@ void compute_extbb(ir_graph *irg)
 
                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;
@@ -266,7 +265,7 @@ void compute_extbb(ir_graph *irg)
                extbb->visited = 0;
        }
 
-       irg->extblk_state = extblk_valid;
+       set_irg_state(irg, IR_GRAPH_STATE_VALID_EXTENDED_BLOCKS);
 }
 
 /* free all extended block info. */
@@ -277,7 +276,7 @@ void free_extbb(ir_graph *irg)
                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. */
@@ -380,7 +379,7 @@ static void irg_extblock_walk_2(ir_extblk *blk, extbb_walk_func *pre, extbb_walk
        }
 }
 
-/* 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)
 {