Bail out if we do not know how to assemble CPUID.
[libfirm] / ir / ana / irdom.c
index c44f751..ff572d8 100644 (file)
@@ -52,7 +52,8 @@ ir_node *get_Block_idom(const ir_node *bl)
        assert(is_Block(bl));
        if (get_Block_dom_depth(bl) == -1) {
                /* This block is not reachable from Start */
-               return new_Bad();
+               ir_graph *irg = get_irn_irg(bl);
+               return new_r_Bad(irg);
        }
        return get_dom_info(bl)->idom;
 }
@@ -83,7 +84,8 @@ ir_node *get_Block_ipostdom(const ir_node *bl)
        assert(is_Block(bl));
        if (get_Block_postdom_depth(bl) == -1) {
                /* This block is not reachable from Start */
-               return new_Bad();
+               ir_graph *irg = get_irn_irg(bl);
+               return new_r_Bad(irg);
        }
        return get_pdom_info(bl)->idom;
 }
@@ -408,7 +410,7 @@ void postdom_tree_walk_irg(ir_graph *irg, irg_walk_func *pre,
 
 static void assign_tree_dom_pre_order(ir_node *bl, void *data)
 {
-       unsigned *num = data;
+       unsigned *num = (unsigned*) data;
        ir_dom_info *bi = get_dom_info(bl);
 
        bi->tree_pre_num = (*num)++;
@@ -434,7 +436,7 @@ static void assign_tree_dom_pre_order_max(ir_node *bl, void *data)
 
 static void assign_tree_postdom_pre_order(ir_node *bl, void *data)
 {
-       unsigned *num = data;
+       unsigned *num = (unsigned*) data;
        ir_dom_info *bi = get_pdom_info(bl);
 
        bi->tree_pre_num = (*num)++;
@@ -698,7 +700,7 @@ void compute_doms(ir_graph *irg)
                        tmp_dom_info *u;
 
                        if (is_Bad(pred) || (get_Block_dom_pre_num (pred) == -1))
-                               continue;       /* control-dead */
+                               continue;    /* control-dead */
 
                        u = dom_eval (&tdi_list[get_Block_dom_pre_num(pred)]);
                        if (u->semi < w->semi) w->semi = u->semi;
@@ -713,8 +715,8 @@ void compute_doms(ir_graph *irg)
                                ir_node *pred = get_irn_n(end, j);
                                tmp_dom_info *u;
 
-                               if (is_no_Block(pred) || get_Block_dom_pre_num(pred) == -1)
-                                       continue;       /* control-dead */
+                               if (!is_Block(pred) || get_Block_dom_pre_num(pred) == -1)
+                                       continue;   /* control-dead */
 
                                u = dom_eval (&tdi_list[get_Block_dom_pre_num(pred)]);
                                if (u->semi < w->semi) w->semi = u->semi;
@@ -840,7 +842,7 @@ void compute_postdoms(ir_graph *irg)
                        tmp_dom_info *u;
 
                        if (get_Block_postdom_pre_num (succ) == -1)
-                               continue;       /* endless-loop */
+                               continue;    /* endless-loop */
 
                        u = dom_eval (&tdi_list[get_Block_postdom_pre_num(succ)]);
                        if (u->semi < w->semi) w->semi = u->semi;