be_remove_empty_blocks() now return non-zero if the graph was changed
[libfirm] / ir / be / bespillremat.c
index c02b51e..7f8fcdd 100644 (file)
@@ -3402,14 +3402,15 @@ connect_all_spills_with_keep(spill_ilp_t * si)
 /** insert a spill at an arbitrary position */
 ir_node *be_spill2(const arch_env_t *arch_env, ir_node *irn, ir_node *insert)
 {
-       ir_node  *bl    = is_Block(insert)?insert:get_nodes_block(insert);
+       ir_node  *bl    = is_Block(insert) ? insert : get_nodes_block(insert);
        ir_graph *irg   = get_irn_irg(bl);
        ir_node  *frame = get_irg_frame(irg);
        ir_node  *spill;
        ir_node  *next;
-       const arch_register_class_t *cls = arch_get_irn_reg_class(arch_env, irn, -1);
+       const arch_register_class_t *cls       = arch_get_irn_reg_class(arch_env, irn, -1);
+       const arch_register_class_t *cls_frame = arch_get_irn_reg_class(arch_env, frame, -1);
 
-       spill = be_new_Spill(cls, irg, bl, irn);
+       spill = be_new_Spill(cls, cls_frame, irg, bl, frame, irn);
 
        /*
         * search the right insertion point. a spill of a phi cannot be put
@@ -4535,15 +4536,10 @@ be_spill_remat(be_irg_t *birg, const arch_register_class_t *cls)
        DBG((si.dbg, LEVEL_1, "\tdone.\n"));
 }
 
-static void be_spill_remat_oldinterface(const be_chordal_env_t *cenv)
-{
-       return be_spill_remat(cenv->birg, cenv->cls);
-}
-
 void be_init_spillremat(void)
 {
        static be_spiller_t remat_spiller = {
-               be_spill_remat_oldinterface
+               be_spill_remat
        };
        lc_opt_entry_t *be_grp = lc_opt_get_grp(firm_opt_get_root(), "be");
        lc_opt_entry_t *ra_grp = lc_opt_get_grp(be_grp, "ra");