remove no-out_of_bounds option from lower_switch
[libfirm] / ir / be / bechordal_common.c
index 2a3e634..e4cab1b 100644 (file)
@@ -37,7 +37,7 @@
 #include "beirgmod.h"
 #include "beinsn_t.h"
 #include "besched.h"
-#include "bestatevent.h"
+#include "statev_t.h"
 #include "benode.h"
 #include "bemodule.h"
 #include "belive.h"
@@ -112,13 +112,10 @@ void create_borders(ir_node *block, void *env_ptr)
 #define border_use(irn, step, real) \
        border_add(env, head, irn, step, ++pressure, 0, real)
 
-       be_chordal_env_t *env             = (be_chordal_env_t*)env_ptr;
-       bitset_t *live                    = bitset_malloc(get_irg_last_idx(env->irg));
-       ir_node *irn;
-       be_lv_t *lv                       = be_get_irg_liveness(env->irg);
+       be_chordal_env_t *env  = (be_chordal_env_t*)env_ptr;
+       bitset_t         *live = bitset_malloc(get_irg_last_idx(env->irg));
+       be_lv_t          *lv   = be_get_irg_liveness(env->irg);
 
-       int i, n;
-       size_t elm;
        unsigned step = 0;
        unsigned pressure = 0;
        struct list_head *head;
@@ -135,8 +132,7 @@ void create_borders(ir_node *block, void *env_ptr)
         * Make final uses of all values live out of the block.
         * They are necessary to build up real intervals.
         */
-       be_lv_foreach(lv, block, be_lv_state_end, i) {
-               ir_node *irn = be_lv_get_irn(lv, block, i);
+       be_lv_foreach(lv, block, be_lv_state_end, irn) {
                if (has_reg_class(env, irn)) {
                        DBG((dbg, LEVEL_3, "\tMaking live: %+F/%d\n", irn, get_irn_idx(irn)));
                        bitset_set(live, get_irn_idx(irn));
@@ -185,7 +181,7 @@ void create_borders(ir_node *block, void *env_ptr)
                 * If the node is no phi node we can examine the uses.
                 */
                if (!is_Phi(irn)) {
-                       for (i = 0, n = get_irn_arity(irn); i < n; ++i) {
+                       for (int i = 0, n = get_irn_arity(irn); i < n; ++i) {
                                ir_node *op = get_irn_n(irn, i);
 
                                if (has_reg_class(env, op)) {
@@ -256,7 +252,7 @@ ir_node *pre_process_constraints(be_chordal_env_t *env, be_insn_t **the_insn)
        if (perm == NULL)
                return NULL;
 
-       be_stat_ev("constr_perm", get_irn_arity(perm));
+       stat_ev_int("constr_perm", get_irn_arity(perm));
        foreach_out_edge(perm, edge) {
                ir_node *proj = get_edge_src_irn(edge);
                arch_set_irn_register(proj, NULL);