- split get_pairidx_for_regidx(), always called with constant parameter
[libfirm] / ir / be / beschedregpress.c
index 611eff6..46bea13 100644 (file)
@@ -24,9 +24,7 @@
  * @date        29.08.2006
  * @version     $Id$
  */
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include <stdlib.h>
 
@@ -50,7 +48,6 @@ typedef struct _usage_stats_t {
 
 typedef struct {
        const list_sched_selector_t *vtab;
-       const arch_env_t *arch_env;
 } reg_pressure_main_env_t;
 
 typedef struct {
@@ -178,8 +175,7 @@ static void *reg_pressure_graph_init(const list_sched_selector_t *vtab, const be
 {
        reg_pressure_main_env_t *main_env = XMALLOC(reg_pressure_main_env_t);
 
-       main_env->arch_env = be_get_birg_arch_env(birg);
-       main_env->vtab     = vtab;
+       main_env->vtab = vtab;
        irg_walk_graph(be_get_birg_irg(birg), firm_clear_link, NULL, NULL);
 
        return main_env;
@@ -294,7 +290,7 @@ static ir_node *reg_pressure_select(void *block_env, ir_nodeset_t *ready_set,
                Ignore branch instructions for the time being.
                They should only be scheduled if there is nothing else.
                */
-               if (! arch_irn_class_is(env->main_env->arch_env, irn, branch)) {
+               if (!arch_irn_class_is(irn, branch)) {
                        int costs = reg_pr_costs(env, irn);
                        if (costs <= curr_cost) {
                                res       = irn;