identifiers starting with _ are reserved; remove this bad practice
[libfirm] / ir / opt / tailrec.c
index 1855711..333613d 100644 (file)
@@ -52,7 +52,7 @@ DEBUG_ONLY(static firm_dbg_module_t *dbg);
 /**
  * the environment for collecting data
  */
-typedef struct _collect_t {
+typedef struct collect_t {
        ir_node *proj_X;      /**< initial exec proj */
        ir_node *block;       /**< old first block */
        int     blk_idx;      /**< cfgpred index of the initial exec in block */
@@ -219,7 +219,7 @@ static void do_opt_tail_rec(ir_graph *irg, tr_env *env)
 
        /* build the memory phi */
        i = 0;
-       in[i] = new_r_Proj(get_irg_start_block(irg), get_irg_start(irg), mode_M, pn_Start_M);
+       in[i] = new_r_Proj(get_irg_start(irg), mode_M, pn_Start_M);
        set_irg_initial_mem(irg, in[i]);
        ++i;
 
@@ -251,7 +251,7 @@ static void do_opt_tail_rec(ir_graph *irg, tr_env *env)
                for (i = 0; i < n_params; ++i) {
                        ir_mode *mode = get_type_mode(get_method_param_type(method_tp, i));
 
-                       in[0] = new_r_Proj(args_bl, args, mode, i);
+                       in[0] = new_r_Proj(args, mode, i);
                        for (j = 0; j < env->n_tail_calls; ++j)
                                in[j + 1] = call_params[j][i];
 
@@ -581,12 +581,13 @@ int opt_tail_rec_irg(ir_graph *irg)
        ir_type           *mtd_type, *call_type;
        ir_entity         *ent;
 
+       FIRM_DBG_REGISTER(dbg, "firm.opt.tailrec");
+
        assure_irg_outs(irg);
 
        if (! check_lifetime_of_locals(irg))
                return 0;
 
-
        ent      = get_irg_entity(irg);
        mtd_type = get_entity_type(ent);
     n_ress   = get_method_n_ress(mtd_type);