split graph state into properties and constraints
[libfirm] / ir / be / bessadestr.c
index edf4119..dc1180f 100644 (file)
@@ -22,7 +22,6 @@
  * @brief       Performs SSA-Destruction.
  * @author      Daniel Grund
  * @date        25.05.2005
- * @version     $Id$
  */
 #include "config.h"
 
@@ -242,7 +241,6 @@ static void set_regs_or_place_dupls_walker(ir_node *bl, void *data)
             phi = (ir_node*)get_irn_link(phi)) {
                ir_node                     *phi_block = get_nodes_block(phi);
                const arch_register_t       *phi_reg   = arch_get_irn_register(phi);
-               const arch_register_class_t *cls       = phi_reg->reg_class;
                int                          max;
                int                          i;
 
@@ -280,7 +278,7 @@ static void set_regs_or_place_dupls_walker(ir_node *bl, void *data)
                                        insert it into schedule,
                                        pin it
                                */
-                               ir_node *dupl  = be_new_Copy(cls, arg_block, arg);
+                               ir_node *dupl = be_new_Copy(arg_block, arg);
 
                                set_irn_n(phi, i, dupl);
                                arch_set_irn_register(dupl, phi_reg);
@@ -336,7 +334,7 @@ static void set_regs_or_place_dupls_walker(ir_node *bl, void *data)
                                        pin it
                                */
                                ir_node *perm = get_Proj_pred(arg);
-                               ir_node *dupl = be_new_Copy(cls, arg_block, arg);
+                               ir_node *dupl = be_new_Copy(arg_block, arg);
                                ir_node *ins;
 
                                set_irn_n(phi, i, dupl);
@@ -367,11 +365,10 @@ void be_ssa_destruction(be_chordal_env_t *chordal_env)
        insert_all_perms_env_t insert_perms_env;
        pmap     *perm_map = pmap_create();
        ir_graph *irg      = chordal_env->irg;
-       be_lv_t  *lv       = be_assure_liveness(irg);
 
        FIRM_DBG_REGISTER(dbg, "ir.be.ssadestr");
 
-       be_liveness_invalidate(lv);
+       be_invalidate_live_sets(irg);
 
        /* create a map for fast lookup of perms: block --> perm */
        irg_walk_graph(irg, clear_link, collect_phis_walker, chordal_env);
@@ -381,20 +378,16 @@ void be_ssa_destruction(be_chordal_env_t *chordal_env)
        insert_perms_env.perm_map = perm_map;
        irg_block_walk_graph(irg, insert_all_perms_walker, NULL, &insert_perms_env);
 
-       // Matze: really needed here?
-       // Sebastian: Yes. the walker function uses interference.
-       be_liveness_invalidate(lv);
-
        if (chordal_env->opts->dump_flags & BE_CH_DUMP_SSADESTR)
                dump_ir_graph(irg, "ssa_destr_perms_placed");
 
-       be_liveness_assure_chk(lv);
+       be_assure_live_chk(irg);
 
        DBG((dbg, LEVEL_1, "Setting regs and placing dupls...\n"));
        irg_block_walk_graph(irg, set_regs_or_place_dupls_walker, NULL, chordal_env);
 
-       /* TODO: unfortunately updating doesn't work yet. */
-       be_liveness_invalidate(lv);
+       /* unfortunately updating doesn't work yet. */
+       be_invalidate_live_chk(irg);
 
        if (chordal_env->opts->dump_flags & BE_CH_DUMP_SSADESTR)
                dump_ir_graph(irg, "ssa_destr_regs_set");
@@ -416,7 +409,7 @@ static void ssa_destruction_check_walker(ir_node *bl, void *data)
                /* iterate over all args of phi */
                for (i = 0, max = get_irn_arity(phi); i < max; ++i) {
                        ir_node                   *arg = get_irn_n(phi, i);
-                       const arch_register_req_t *req = arch_get_register_req_out(arg);
+                       const arch_register_req_t *req = arch_get_irn_register_req(arg);
 
                        if (req->type & arch_register_req_type_ignore)
                                continue;