handle a call of an absolute address
[libfirm] / ir / opt / tailrec.c
index 1210d7d..ca7e917 100644 (file)
@@ -131,9 +131,9 @@ static void do_opt_tail_rec(ir_graph *irg, ir_node *rets, int n_tail_calls)
   ir_node *p;
   int i, j, n_params;
   collect_t data;
-  int rem         = get_optimize();
-  entity *ent     = get_irg_entity(irg);
-  type *method_tp = get_entity_type(ent);
+  int rem            = get_optimize();
+  entity *ent        = get_irg_entity(irg);
+  ir_type *method_tp = get_entity_type(ent);
 
   assert(n_tail_calls);
 
@@ -141,7 +141,7 @@ static void do_opt_tail_rec(ir_graph *irg, ir_node *rets, int n_tail_calls)
   set_irg_outs_inconsistent(irg);
 
   /* we add new blocks and change the control flow */
-  set_irg_dom_inconsistent(irg);
+  set_irg_doms_inconsistent(irg);
 
   /* we add a new loop */
   set_irg_loopinfo_inconsistent(irg);
@@ -251,7 +251,7 @@ static void do_opt_tail_rec(ir_graph *irg, ir_node *rets, int n_tail_calls)
   }
 
   /* tail recursion was done, all info is invalid */
-  set_irg_dom_inconsistent(irg);
+  set_irg_doms_inconsistent(irg);
   set_irg_outs_inconsistent(irg);
   set_irg_loopinfo_state(current_ir_graph, loopinfo_cf_inconsistent);
   set_trouts_inconsistent();
@@ -280,7 +280,7 @@ static int check_lifetime_of_locals(ir_graph *irg)
   for (i = get_irn_n_outs(irg_frame) - 1; i >= 0; --i) {
     ir_node *succ = get_irn_out(irg_frame, i);
 
-    if (get_irn_op(succ) == op_Sel && is_address_taken(succ))
+    if (is_Sel(succ) && is_address_taken(succ))
       return 0;
   }
   return 1;
@@ -294,7 +294,7 @@ int opt_tail_rec_irg(ir_graph *irg)
   ir_node *end_block;
   int i, n_tail_calls = 0;
   ir_node *rets = NULL;
-  type *mtd_type, *call_type;
+  ir_type *mtd_type, *call_type;
 
   if (! get_opt_tail_recursion() || ! get_opt_optimize())
     return 0;
@@ -318,13 +318,13 @@ int opt_tail_rec_irg(ir_graph *irg)
     int j;
     ir_node **ress;
 
-    /* search all returns of a block */
-    if (get_irn_op(ret) != op_Return)
+    /* search all Returns of a block */
+    if (! is_Return(ret))
       continue;
 
     /* check, if it's a Return self() */
     call = skip_Proj(get_Return_mem(ret));
-    if (get_irn_op(call) != op_Call)
+    if (! is_Call(call))
       continue;
 
     /* check if it's a recursive call */