Remove the unused attribute const arch_env_t *arch_env from struct estimate_irg_costs...
authorChristoph Mallon <christoph.mallon@gmx.de>
Sat, 11 Oct 2008 20:55:53 +0000 (20:55 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sat, 11 Oct 2008 20:55:53 +0000 (20:55 +0000)
[r22757]

ir/be/bechordal_main.c
ir/be/bemain.c
ir/be/bestat.c
ir/be/bestat.h

index 4332d32..c81b3bd 100644 (file)
@@ -225,7 +225,6 @@ static void pre_spill(post_spill_env_t *pse, const arch_register_class_t *cls)
        be_chordal_env_t    *chordal_env = &pse->cenv;
        be_irg_t            *birg        = pse->birg;
        ir_graph            *irg         = be_get_birg_irg(birg);
        be_chordal_env_t    *chordal_env = &pse->cenv;
        be_irg_t            *birg        = pse->birg;
        ir_graph            *irg         = be_get_birg_irg(birg);
-       const be_main_env_t *main_env    = birg->main_env;
 
        pse->cls                   = cls;
        chordal_env->cls           = cls;
 
        pse->cls                   = cls;
        chordal_env->cls           = cls;
@@ -235,7 +234,7 @@ static void pre_spill(post_spill_env_t *pse, const arch_register_class_t *cls)
        be_assure_liveness(birg);
        be_liveness_assure_chk(be_get_birg_liveness(birg));
 
        be_assure_liveness(birg);
        be_liveness_assure_chk(be_get_birg_liveness(birg));
 
-       stat_ev_do(pse->pre_spill_cost = be_estimate_irg_costs(irg, main_env->arch_env, birg->exec_freq));
+       stat_ev_do(pse->pre_spill_cost = be_estimate_irg_costs(irg, birg->exec_freq));
 
        /* put all ignore registers into the ignore register set. */
        be_put_ignore_regs(birg, pse->cls, chordal_env->ignore_colors);
 
        /* put all ignore registers into the ignore register set. */
        be_put_ignore_regs(birg, pse->cls, chordal_env->ignore_colors);
@@ -254,13 +253,12 @@ static void post_spill(post_spill_env_t *pse, int iteration) {
        be_chordal_env_t    *chordal_env = &pse->cenv;
        be_irg_t            *birg        = pse->birg;
        ir_graph            *irg         = birg->irg;
        be_chordal_env_t    *chordal_env = &pse->cenv;
        be_irg_t            *birg        = pse->birg;
        ir_graph            *irg         = birg->irg;
-       const be_main_env_t *main_env    = birg->main_env;
-       int                  colors_n     = arch_register_class_n_regs(chordal_env->cls);
+       int                  colors_n    = arch_register_class_n_regs(chordal_env->cls);
        int             allocatable_regs = colors_n - be_put_ignore_regs(birg, chordal_env->cls, NULL);
 
        /* some special classes contain only ignore regs, no work to be done */
        if (allocatable_regs > 0) {
        int             allocatable_regs = colors_n - be_put_ignore_regs(birg, chordal_env->cls, NULL);
 
        /* some special classes contain only ignore regs, no work to be done */
        if (allocatable_regs > 0) {
-               stat_ev_dbl("bechordal_spillcosts", be_estimate_irg_costs(irg, main_env->arch_env, birg->exec_freq) - pse->pre_spill_cost);
+               stat_ev_dbl("bechordal_spillcosts", be_estimate_irg_costs(irg, birg->exec_freq) - pse->pre_spill_cost);
 
                /*
                        If we have a backend provided spiller, post spill is
 
                /*
                        If we have a backend provided spiller, post spill is
index 9f72526..81f137e 100644 (file)
@@ -752,7 +752,7 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
 
                stat_ev_if {
                        stat_ev_dbl("bemain_costs_before_ra",
 
                stat_ev_if {
                        stat_ev_dbl("bemain_costs_before_ra",
-                                       be_estimate_irg_costs(irg, arch_env, birg->exec_freq));
+                                       be_estimate_irg_costs(irg, birg->exec_freq));
                        be_stat_ev("bemain_insns_before_ra", be_count_insns(irg));
                        be_stat_ev("bemain_blocks_before_ra", be_count_blocks(irg));
                }
                        be_stat_ev("bemain_insns_before_ra", be_count_insns(irg));
                        be_stat_ev("bemain_blocks_before_ra", be_count_blocks(irg));
                }
@@ -761,7 +761,7 @@ static void be_main_loop(FILE *file_handle, const char *cup_name)
                be_allocate_registers(birg);
 
 #ifdef FIRM_STATISTICS
                be_allocate_registers(birg);
 
 #ifdef FIRM_STATISTICS
-               stat_ev_dbl("bemain_costs_before_ra", be_estimate_irg_costs(irg, arch_env, birg->exec_freq));
+               stat_ev_dbl("bemain_costs_before_ra", be_estimate_irg_costs(irg, birg->exec_freq));
 #endif
 
                dump(DUMP_RA, irg, "-ra", dump_ir_block_graph_sched);
 #endif
 
                dump(DUMP_RA, irg, "-ra", dump_ir_block_graph_sched);
index a4f16aa..4e5a9c5 100644 (file)
@@ -122,7 +122,6 @@ void be_do_stat_reg_pressure(be_irg_t *birg, const arch_register_class_t *cls) {
 
 
 typedef struct _estimate_irg_costs_env_t {
 
 
 typedef struct _estimate_irg_costs_env_t {
-       const arch_env_t *arch_env;
        ir_exec_freq     *execfreqs;
        double           costs;
 } estimate_irg_costs_env_t;
        ir_exec_freq     *execfreqs;
        double           costs;
 } estimate_irg_costs_env_t;
@@ -140,11 +139,10 @@ static void estimate_block_costs(ir_node *block, void *data)
        env->costs += costs * get_block_execfreq(env->execfreqs, block);
 }
 
        env->costs += costs * get_block_execfreq(env->execfreqs, block);
 }
 
-double be_estimate_irg_costs(ir_graph *irg, const arch_env_t *arch_env, ir_exec_freq *execfreqs)
+double be_estimate_irg_costs(ir_graph *irg, ir_exec_freq *execfreqs)
 {
        estimate_irg_costs_env_t env;
 
 {
        estimate_irg_costs_env_t env;
 
-       env.arch_env  = arch_env;
        env.execfreqs = execfreqs;
        env.costs     = 0.0;
 
        env.execfreqs = execfreqs;
        env.costs     = 0.0;
 
index afd81d4..ce1e3f6 100644 (file)
@@ -66,8 +66,7 @@ void be_do_stat_reg_pressure(be_irg_t *birg, const arch_register_class_t *cls);
  * Gives a cost estimate for the program (based on execution frequencies)
  * and backend op_estimated_cost
  */
  * Gives a cost estimate for the program (based on execution frequencies)
  * and backend op_estimated_cost
  */
-double be_estimate_irg_costs(ir_graph *irg, const arch_env_t *arch_env,
-                             ir_exec_freq *execfreqs);
+double be_estimate_irg_costs(ir_graph *irg, ir_exec_freq *execfreqs);
 
 /**
  * return number of "instructions" (=nodes without some virtual nodes like Proj,
 
 /**
  * return number of "instructions" (=nodes without some virtual nodes like Proj,