- BugFix: check mode_T nodes for different_constraints
[libfirm] / ir / be / bessadestrsimple.c
index 1068a42..c7dbcf7 100644 (file)
@@ -26,9 +26,7 @@
  */
 #ifdef NOT_PORTED
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
-#endif
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -38,7 +36,6 @@
 #include "pset.h"
 #include "pmap.h"
 #include "bitset.h"
-#include "xmalloc.h"
 
 #include "irprintf_t.h"
 #include "irnode_t.h"
@@ -64,7 +61,6 @@
 typedef struct _ssa_destr_env_t {
        ir_graph                    *irg;
        const arch_register_class_t *cls;
-       const arch_env_t            *aenv;
        set                         *vars;
 } ssa_destr_env_t;
 
@@ -164,7 +160,7 @@ static void values_to_vars(ir_node *irn, void *env) {
        int             nr, i, build_vals = 0;
        ir_node         **vals;
 
-       if (arch_get_irn_reg_class(sde->aenv, irn, -1) == NULL)
+       if (arch_get_irn_reg_class(irn, -1) == NULL)
                return;
 
        vals = get_phi_class(pc, irn);
@@ -241,7 +237,7 @@ static ir_node *insert_copies(ssa_destr_env_t *sde, const arch_register_class_t
 
        /* In case this is a 'normal' phi we insert at the
         * end of the pred block before cf nodes */
-       last_cpy = sched_skip(pred_blk, 0, sched_skip_cf_predicator, (void *)sde->aenv);
+       last_cpy = sched_skip(pred_blk, 0, sched_skip_cf_predicator, NULL);
        last_cpy = sched_next(last_cpy);
 
        /* If we detect a loop stop recursion. */
@@ -298,21 +294,21 @@ static void ssa_destr_simple_walker(ir_node *blk, void *env) {
                        if (!is_Phi(phi))
                                break;
 
-                       if (arch_irn_is(sde->aenv, phi, ignore))
+                       if (arch_irn_is(phi, ignore))
                                continue;
 
-                       cls = arch_get_irn_reg_class(sde->aenv, phi, -1);
+                       cls = arch_get_irn_reg_class(phi, -1);
                        insert_copies(sde, cls, phi, pos, phi);
                }
        }
 }
 
 
-set *be_ssa_destr_simple(ir_graph *irg, const arch_env_t *aenv) {
+set *be_ssa_destr_simple(ir_graph *irg)
+{
        ssa_destr_env_t sde;
 
        sde.irg = irg;
-       sde.aenv = aenv;
        sde.vars = new_set(compare_var_infos, 16);
 
        be_clear_links(irg);