bechordal: Handle Phis more like live-ins instead of regular scheduled nodes in creat...
[libfirm] / ir / be / becopyilp.c
index d7cf202..48077b4 100644 (file)
@@ -1,20 +1,6 @@
 /*
- * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
- *
  * This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
+ * Copyright (C) 2012 University of Karlsruhe.
  */
 
 /**
 
 #include <stdbool.h>
 
+#include "be_t.h"
 #include "irtools.h"
 #include "irprintf.h"
 
-#include "bestatevent.h"
-#include "beirg.h"
+#include "statev_t.h"
 #include "bemodule.h"
 #include "error.h"
 
@@ -110,7 +96,6 @@ static inline bool sr_is_simplicial(size_red_t *sr, const ir_node *ifn)
        be_ifg_t *ifg  = sr->co->cenv->ifg;
        neighbours_iter_t iter;
        ir_node **all  = ALLOCAN(ir_node*, be_ifg_degree(ifg, ifn));
-       ir_node  *curr;
        int       size = 0;
        int       i;
        int       o;
@@ -132,7 +117,6 @@ static inline bool sr_is_simplicial(size_red_t *sr, const ir_node *ifn)
 
 void sr_remove(size_red_t *sr)
 {
-       ir_node *irn;
        bool redo = true;
        const be_ifg_t *ifg = sr->co->cenv->ifg;
        nodes_iter_t iter;
@@ -168,19 +152,16 @@ void sr_reinsert(size_red_t *sr)
        ir_graph *irg        = sr->co->irg;
        be_ifg_t *ifg        = sr->co->cenv->ifg;
        unsigned  n_regs     = arch_register_class_n_regs(sr->co->cls);
-       unsigned *possible_cols;
-       unsigned *allocatable_cols;
 
-       rbitset_alloca(allocatable_cols, n_regs);
+       unsigned *const allocatable_cols = rbitset_alloca(n_regs);
        be_set_allocatable_regs(irg, sr->co->cls, allocatable_cols);
 
-       rbitset_alloca(possible_cols, n_regs);
+       unsigned *const possible_cols = rbitset_alloca(n_regs);
        neighbours_iter_t iter;
 
        /* color the removed nodes in right order */
        for (cs = sr->col_suff; cs; cs = cs->next) {
                unsigned free_col;
-               ir_node *other;
                ir_node *irn = cs->irn;
 
                rbitset_copy(possible_cols, allocatable_cols, n_regs);
@@ -280,10 +261,10 @@ lpp_sol_state_t ilp_go(ilp_env_t *ienv)
 
        lpp_solve(ienv->lp, be_options.ilp_server, be_options.ilp_solver);
 
-       //be_stat_ev_dbl("co_ilp_objval",     ienv->lp->objval);
-       //be_stat_ev_dbl("co_ilp_best_bound", ienv->lp->best_bound);
-       be_stat_ev    ("co_ilp_iter",       lpp_get_iter_cnt(ienv->lp));
-       be_stat_ev_dbl("co_ilp_sol_time",   lpp_get_sol_time(ienv->lp));
+       //stat_ev_dbl("co_ilp_objval",     ienv->lp->objval);
+       //stat_ev_dbl("co_ilp_best_bound", ienv->lp->best_bound);
+       stat_ev_int("co_ilp_iter",       lpp_get_iter_cnt(ienv->lp));
+       stat_ev_dbl("co_ilp_sol_time",   lpp_get_sol_time(ienv->lp));
 
        ienv->apply(ienv);