Fixed skip_Tuple(), so no need for additional loop
[libfirm] / ir / ana / irdom.c
index 5df16de..9f8bb72 100644 (file)
@@ -27,8 +27,8 @@
 #include "irnode_t.h"
 #include "ircons_t.h"
 
-#define get_dom_info(bl) (&(bl)->attr.block.dom)
 
+#define get_dom_info(bl) (&(bl)->attr.block.dom)
 
 /*--------------------------------------------------------------------*/
 /** Accessing the dominator data structures                          **/
@@ -100,12 +100,13 @@ int block_dominates(const ir_node *a, const ir_node *b)
        const dom_info *ai, *bi;
 
        if (is_Block(a) && is_Block(b)) {
-          ai = get_dom_info(a);
-          bi = get_dom_info(b);
-          return bi->tree_pre_num - ai->tree_pre_num
-                  <= ai->max_subtree_pre_num - ai->tree_pre_num;
-        }
-        return 0;
+               ai = get_dom_info(a);
+               bi = get_dom_info(b);
+               return bi->tree_pre_num - ai->tree_pre_num
+                       <= ai->max_subtree_pre_num - ai->tree_pre_num;
+       }
+
+       return 0;
 }
 
 ir_node *get_Block_dominated_first(const ir_node *bl)
@@ -299,7 +300,7 @@ void compute_doms(ir_graph *irg) {
 
   /* We need the out datastructure. */
   if (current_ir_graph->outs_state != outs_consistent)
-    compute_outs(current_ir_graph);
+    compute_irg_outs(current_ir_graph);
 
   /* this with a standard walker as passing the parent to the sons isn't
      simple. */
@@ -320,12 +321,10 @@ void compute_doms(ir_graph *irg) {
     /* Step 2 */
     irn_arity = get_irn_arity(w->block);
     for (j = 0;  j < irn_arity;  j++) {
-      ir_node *cf_op = get_Block_cfgpred(w->block, j);
-      ir_node *pred  = get_nodes_block(cf_op);
+      ir_node *pred = get_Block_cfgpred_block(w->block, j);
       tmp_dom_info *u;
 
-      if ((is_Bad(cf_op)) || (is_Bad(pred)) ||
-         (get_Block_pre_num (pred) == -1))
+      if (is_Bad(pred) || (get_Block_pre_num (pred) == -1))
        continue;       /* control-dead */
 
       u = dom_eval (&tdi_list[get_Block_pre_num(pred)]);